aboutsummaryrefslogtreecommitdiffstats
path: root/src/components/molecules/layout/card.tsx
Commit message (Collapse)AuthorAgeFilesLines
* refactor(components): rewrite Card componentArmand Philippot2023-11-111-88/+0
| | | | | | | | | | | | | * make the component more generic * merge `<Summary />` and `<Comment />` styles into card component to avoid repeating the same structure * remove most of the props to use composition However the CSS is a bit complex because of the two variants... Also, the component should be refactored when the CSS pseudo-class `:has` has enough support: the provider and the `cover` and `meta` props should be removed.
* refactor(components): replace Meta component with MetaListArmand Philippot2023-11-111-3/+9
| | | | | | It removes items complexity by allowing consumers to use any label/value association. Translations should also be defined by the consumer. Each item can now be configured separately (borders, layout...).
* refactor(components): replace ResponsiveImage with Figure componentArmand Philippot2023-11-111-5/+6
| | | | | | | | The styles applied to ResponsiveImage are related to the figure and figcaption elements. Those elements could be use with other contents than images. So I extracted them in a Figure component. The ResponsiveImage component is no longer useful: the consumer should use the Image component from `next` and wrap it in a link if needed.
* refactor(components): rewrite DescriptionList componentArmand Philippot2023-11-111-9/+1
| | | | | | | | | | | | | * add a `spacing` prop * replace `layout` prop with `isInline` prop * remove `items` prop (and classNames props) in favor of new components: Description, Group, Term * remove `withSeparator` prop (CSS content is announced by screen readers and Firefox/Safari have no support for alternative text so the consumer should add itself an element with `aria-hidden` if it need a separator) Be aware, Meta component and its consumers can be visually broken, they should be refactored before using them in production.
* refactor(components): rewrite Heading componentArmand Philippot2023-10-241-7/+1
| | | | | | | | | * remove `alignment` and `withMargin` props (consumer should handle that) * move styles to Sass placeholders to avoid repeats with headings coming from WordPress * refactor some other components that depend on Heading to avoid ESlint errors
* refactor(components): rewrite Button and ButtonLink componentsArmand Philippot2023-10-241-14/+17
| | | | | | | | | | | | | | Both: * move styles to Sass placeholders Button: * add `isPressed` prop to Button * add `isLoading` prop to Button (to differentiate state from disabled) ButtonLink: * replace `external` prop with `isExternal` prop * replace `href` prop with `to` prop
* refactor: use named export for everything except pagesArmand Philippot2023-09-201-9/+6
| | | | | | Next expect a default export for pages so only those components should use default exports. Everything else should use named exports to reduce the number of import statements.
* refactor(build): replace paths aliases with relative pathsArmand Philippot2023-09-191-3/+3
| | | | | | Using paths aliases starting with "@" can be confusing and can lead to conflict with existings modules. I prefer to use relative paths to avoid extra configuration in tools because of these aliases.
* chore: make Links and Images compliant with Next.js 13Armand Philippot2023-01-231-16/+3
|
* chore(cards): use post title as link labelArmand Philippot2022-06-071-2/+12
|
* chore: adjust cards list spacingArmand Philippot2022-05-231-1/+1
|
* refactor: reduce the number of data transformationArmand Philippot2022-05-231-20/+2
|
* chore: adjust dark mode stylesArmand Philippot2022-05-221-1/+1
|
* chore: fix minor styles/typescript issues introduced during refactoringArmand Philippot2022-05-181-1/+5
|
* refactor: rewrite DescriptionList and Meta componentsArmand Philippot2022-05-091-9/+7
| | | | | | The meta can have different layout. The previous implementation was not enough to easily change the layout. Also, I prefer to restrict the meta types and it prevents me to repeat myself for the labels.
* chore: add homepageArmand Philippot2022-05-031-1/+1
|
* refactor(storybook): reorganize design systemArmand Philippot2022-04-201-1/+1
| | | | | Add more stories for each components and change some components categories for better organization.
* refactor: support React 18Armand Philippot2022-04-161-4/+4
| | | | | | | | I replaced the deprecated VFC type with FC type and made all children explicits. Formatjs is still not compatible with React 18 so I need to skip type checking when comitting. There are some type errors because of IntlProvider in Storybook stories.
* chore: add a Card componentArmand Philippot2022-04-131-0/+114