diff --git a/CHANGELOG.md b/CHANGELOG.md index cd95e9b..24dc209 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -15,7 +15,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ### Fixed --> -[Unreleased] +## [Unreleased] ### **Breaking changes** @@ -25,6 +25,26 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ### Fixed +## [3.4.5] 2022-01-26 + +### Changes + +- Removed gradient props (gradientInitialColor, gradientMiddleColor, gradientFinalColor) from `ProgramCard` component. +- Removed gradient props (gradientInitialColor, gradientMiddleColor, gradientFinalColor) from `EventCard` component. + +### Added + +- Added prop classNameBar to allow changing the styles of bar for the `EventCard` component. +- Added class `outline-none` to `ModuleCard` to prevent outline when focus the button. +- Added class `outline-none` to `ProgramCard` to prevent outline when focus the button. +- Added class `outline-none` to `EventCard` to prevent outline when focus the button. +- Added `onPressButton` callback to `EventCard` button. + +### Fixed + +- Fixed problem with `ModuleCard` and `ProgramCard` buttons displaying a black outline when pressed. +- Fixed problem with `EventCard` not having a button callback. + ## [3.4.4] 2022-01-24 ### Added diff --git a/package.json b/package.json index 3facbec..d4ba860 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "name": "@perimetre/ui", "description": "A component library made by @perimetre", - "version": "3.4.4", + "version": "3.4.5", "repository": { "type": "git", "url": "git+https://github.com/perimetre/ui.git" diff --git a/src/components/EventCard/index.tsx b/src/components/EventCard/index.tsx index ade71f9..56ef2e2 100644 --- a/src/components/EventCard/index.tsx +++ b/src/components/EventCard/index.tsx @@ -46,35 +46,29 @@ export type EventCardProps = { */ className?: string; /** - * Gradient bar initial color value - * - * @default string - */ - tags?: string; - /** - * Events Tags + * Extended classes for bar * * @default string */ - tagsLabel?: string; + classNameBar?: string; /** - * Events Tags + * Card button callback * - * @default string + * @default void */ - gradientInitialColor?: string; + onPressButton?: () => void; /** - * Gradient bar initial color value if needed + * Gradient bar initial color value * * @default string */ - gradientMiddleColor?: string; + tags?: string; /** - * Gradient bar final color value + * Events Tags * * @default string */ - gradientFinalColor?: string; + tagsLabel?: string; }; /** @@ -88,11 +82,10 @@ export type EventCardProps = { * @param props.sponsorLabel Set the sponsor image label * @param props.imageUrl Set the sponsor image * @param props.className The input className - * @param props.gradientInitialColor The gradient bar initial color value - * @param props.gradientMiddleColor The input className - * @param props.gradientFinalColor The input className * @param props.tagsLabel The Events tags label * @param props.tags The Events tags + * @param props.classNameBar The bar className + * @param props.onPressButton The callback when pressing the button */ export const EventCard: React.FC = ({ imageUrl, @@ -102,21 +95,19 @@ export const EventCard: React.FC = ({ date, sponsorLabel, className, - gradientInitialColor, - gradientMiddleColor, - gradientFinalColor, tags, - tagsLabel + tagsLabel, + classNameBar, + onPressButton }) => { return (
+ />
@@ -143,10 +134,13 @@ export const EventCard: React.FC = ({ className="h-12 w-32 bg-contain bg-no-repeat" />
- + diff --git a/src/components/ModuleCard/index.tsx b/src/components/ModuleCard/index.tsx index 01e5ec2..e8562d7 100644 --- a/src/components/ModuleCard/index.tsx +++ b/src/components/ModuleCard/index.tsx @@ -99,7 +99,7 @@ export const ModuleCard: React.FC = ({ return (
- {title} + {title} {filter && (
= ({