Skip to content

Commit

Permalink
Merge pull request #78 from perimetre/7.1.0
Browse files Browse the repository at this point in the history
7.1.0
  • Loading branch information
dgonzalez-perimetre authored Aug 3, 2022
2 parents ac9106e + 18c4052 commit 3d90b87
Show file tree
Hide file tree
Showing 9 changed files with 29 additions and 14 deletions.
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,12 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

### Fixed

## [7.1.0] 2022-08-03

### Added

- Remove uneven borders in cards and add hover state styles

## [7.0.1] 2022-07-21

### Changes
Expand Down
4 changes: 2 additions & 2 deletions src/components/BaseCard/index.css
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
@layer components {
.pui-baseCard {
/* Adds the expected placeholder color for the bg */
@apply flex w-full pui-rounded-Card overflow-hidden pui-boxshadow-lg;
@apply flex w-full overflow-hidden shadow-md rounded-lg border border-gray-100;
}

.pui-rounded-gradient-bar {
border-radius: var(--pui-rounded-gradient-bar, 0.75rem 0 0 0.75rem);
border-radius: var(--pui-rounded-gradient-bar, 0.5rem 0 0 0.5rem);
}

.gradient-bar {
Expand Down
19 changes: 16 additions & 3 deletions src/components/BaseCard/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,12 @@ export type BaseCardProps = {
* @default string
*/
classNameGradientImage?: string;
/**
* Extended classes for hover state
*
* @default false
*/
hoverState?: boolean;
};

/**
Expand All @@ -58,7 +64,7 @@ export type BaseCardProps = {
* @param props.classNameContent The content on the card className
* @param props.classNameGradientImage The filter className
* @param props.children The content of the card
* @param props.hoverState Extended classes for hover state
*/
export const BaseCard: React.FC<BaseCardProps> = ({
imageGradient,
Expand All @@ -68,10 +74,17 @@ export const BaseCard: React.FC<BaseCardProps> = ({
children,
className,
classNameContent,
classNameGradientImage
classNameGradientImage,
hoverState
}) => {
return (
<div className={classnames('pui-baseCard', className)}>
<div
className={classnames(
'pui-baseCard',
{ 'hover:border-pui-primary hover:shadow-lg hover:cursor-pointer': hoverState },
className
)}
>
{leftGradientBar && (
<div className={classnames('gradient-bar', `bg-gradient-to-b from-pui-primary to-pui-secondary`)}></div>
)}
Expand Down
4 changes: 0 additions & 4 deletions src/components/BorderRadius/index.css
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,4 @@
.pui-rounded-bannerCard {
border-radius: var(--pui-bradius-bannerCard, 0.625rem 1.875rem 0 0.625rem);
}

.pui-rounded-Card {
border-radius: var(--pui-bradius-bannerCard, 0.75rem 2.5rem 1.25rem 0.75rem);
}
}
2 changes: 1 addition & 1 deletion src/components/EventCard/index.css
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
@layer components {
.pui-event-card {
/* Adds the expected placeholder color for the bg */
@apply w-full max-w-lg pui-rounded-Card pui-boxshadow-lg flex flex-row;
@apply w-full max-w-lg pui-boxshadow-lg flex flex-row;
}

.pui-rounded-gradient-bar {
Expand Down
2 changes: 1 addition & 1 deletion src/components/ModuleCard/index.css
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
@layer components {
.pui-moduleCard {
/* Adds the expected placeholder color for the bg */
@apply flex flex-col w-full max-w-md pui-rounded-Card overflow-hidden pui-boxshadow-lg;
@apply flex flex-col w-full max-w-md overflow-hidden pui-boxshadow-lg;
}
}
2 changes: 1 addition & 1 deletion src/components/ProgramCard/index.css
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
@layer components {
.pui-programCard {
/* Adds the expected placeholder color for the bg */
@apply w-full max-w-xs pui-rounded-Card overflow-hidden pui-boxshadow-lg;
@apply w-full max-w-xs overflow-hidden pui-boxshadow-lg;
}

.percentage-bar {
Expand Down
2 changes: 1 addition & 1 deletion src/components/ResourcesCard/index.css
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
@layer components {
.pui-resources-card {
/* Adds the expected placeholder color for the bg */
@apply w-full max-w-lg pui-rounded-Card pui-boxshadow-lg flex flex-row;
@apply w-full max-w-lg pui-boxshadow-lg flex flex-row;
}

.pui-rounded-gradient-bar {
Expand Down
2 changes: 1 addition & 1 deletion src/components/WorkSessionCard/index.css
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
@layer components {
.pui-worksession-card {
/* Adds the expected placeholder color for the bg */
@apply w-full max-w-lg pui-rounded-Card pui-boxshadow-lg flex flex-row;
@apply w-full max-w-lg pui-boxshadow-lg flex flex-row;
}

.pui-rounded-gradient-bar {
Expand Down

0 comments on commit 3d90b87

Please sign in to comment.