Skip to content

Commit d3a7ee7

Browse files
committed
💄(frontend) add classname to components
To be easily customized, we added a classname to most of the components.
1 parent 65e450c commit d3a7ee7

File tree

64 files changed

+137
-36
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

64 files changed

+137
-36
lines changed

src/frontend/apps/impress/src/components/BoxButton.tsx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,7 @@ const BoxButton = forwardRef<HTMLDivElement, BoxButtonType>(
4444
${$css || ''}
4545
`}
4646
{...props}
47+
className={`--docs--box-button ${props.className || ''}`}
4748
onClick={(event: React.MouseEvent<HTMLDivElement>) => {
4849
if (props.disabled) {
4950
return;

src/frontend/apps/impress/src/components/Card.tsx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@ export const Card = ({
1414

1515
return (
1616
<Box
17+
className={`--docs--card ${props.className || ''}`}
1718
$background="white"
1819
$radius="4px"
1920
$css={css`

src/frontend/apps/impress/src/components/DropButton.tsx

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -71,6 +71,7 @@ export const DropButton = ({
7171
onPress={() => onOpenChangeHandler(true)}
7272
aria-label={label}
7373
$css={buttonCss}
74+
className="--docs--drop-button"
7475
>
7576
{button}
7677
</StyledButton>
@@ -79,6 +80,7 @@ export const DropButton = ({
7980
triggerRef={triggerRef}
8081
isOpen={isLocalOpen}
8182
onOpenChange={onOpenChangeHandler}
83+
className="--docs--drop-button-popover"
8284
>
8385
{children}
8486
</StyledPopover>

src/frontend/apps/impress/src/components/Icon.tsx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,7 @@ export const IconBG = ({ iconName, ...textProps }: IconBGProps) => {
3636
$padding="4px"
3737
$margin="auto"
3838
{...textProps}
39+
className={`--docs--icon-bg ${textProps.className || ''}`}
3940
>
4041
{iconName}
4142
</Text>

src/frontend/apps/impress/src/components/InfiniteScroll.tsx

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,10 @@ export const InfiniteScroll = ({
3030
};
3131

3232
return (
33-
<Box {...boxProps}>
33+
<Box
34+
{...boxProps}
35+
className={`--docs--infinite-scroll ${boxProps.className || ''}`}
36+
>
3437
{children}
3538
<InView onChange={loadMore}>
3639
{!isLoading && hasMore && (

src/frontend/apps/impress/src/components/LoadMoreText.tsx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@ export const LoadMoreText = ({
2020
$align="center"
2121
$gap="0.4rem"
2222
$padding={{ horizontal: '2xs', vertical: 'sm' }}
23+
className="--docs--load-more"
2324
>
2425
<Icon
2526
$theme="primary"

src/frontend/apps/impress/src/components/TextErrors.tsx

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,12 @@ export const TextErrors = ({
2828
const { t } = useTranslation();
2929

3030
return (
31-
<AlertStyled canClose={canClose} type={VariantType.ERROR} icon={icon}>
31+
<AlertStyled
32+
canClose={canClose}
33+
type={VariantType.ERROR}
34+
icon={icon}
35+
className="--docs--text-errors"
36+
>
3237
<Box $direction="column" $gap="0.2rem">
3338
{causes &&
3439
causes.map((cause, i) => (

src/frontend/apps/impress/src/components/quick-search/QuickSearchStyle.tsx

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -119,8 +119,6 @@ export const QuickSearchStyle = createGlobalStyle`
119119
}
120120
}
121121
122-
123-
124122
.c__modal__scroller:has(.quick-search-container),
125123
.c__modal__scroller:has(.noPadding) {
126124
padding: 0 !important;
@@ -138,6 +136,4 @@ export const QuickSearchStyle = createGlobalStyle`
138136
margin-bottom: 0;
139137
}
140138
}
141-
142-
143139
`;

src/frontend/apps/impress/src/components/separators/HorizontalSeparator.tsx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,7 @@ export const HorizontalSeparator = ({
2828
? '#e5e5e533'
2929
: colorsTokens()['greyscale-100']
3030
}
31+
className="--docs--horizontal-separator"
3132
/>
3233
);
3334
};

src/frontend/apps/impress/src/features/auth/components/ButtonLogin.tsx

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,14 +18,20 @@ export const ButtonLogin = () => {
1818
onClick={() => gotoLogin()}
1919
color="primary-text"
2020
aria-label={t('Login')}
21+
className="--docs--button-login"
2122
>
2223
{t('Login')}
2324
</Button>
2425
);
2526
}
2627

2728
return (
28-
<Button onClick={gotoLogout} color="primary-text" aria-label={t('Logout')}>
29+
<Button
30+
onClick={gotoLogout}
31+
color="primary-text"
32+
aria-label={t('Logout')}
33+
className="--docs--button-logout"
34+
>
2935
{t('Logout')}
3036
</Button>
3137
);
@@ -45,6 +51,7 @@ export const ProConnectButton = () => {
4551
}
4652
`}
4753
$radius="4px"
54+
className="--docs--proconnect-button"
4855
>
4956
<ProConnectImg />
5057
</BoxButton>

0 commit comments

Comments
 (0)