Skip to content

Commit

Permalink
save
Browse files Browse the repository at this point in the history
  • Loading branch information
AntoLC committed Oct 18, 2024
1 parent e35671c commit 7458ed8
Show file tree
Hide file tree
Showing 14 changed files with 270 additions and 422 deletions.
8 changes: 8 additions & 0 deletions src/frontend/apps/impress/cunningham.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,9 @@ const config = {
'primary-100': '#EDF5FA',
'primary-150': '#E5EEFA',
'info-150': '#E5EEFA',
'link-reach-restricted': 'var(--c--theme--colors--danger-500)',
'link-reach-public': 'var(--c--theme--colors--success-500)',
'link-reach-authenticated': 'var(--c--theme--colors--info-500)',
},
font: {
sizes: {
Expand Down Expand Up @@ -358,6 +361,8 @@ const config = {
},
'forms-field': {
color: 'var(--c--theme--colors--primary-text)',
'footer-font-size': 'var(--c--theme--font--sizes--t)',
'footer-color': 'var(--c--theme--colors--greyscale-text)',
},
'forms-input': {
'border-radius': '4px',
Expand All @@ -372,6 +377,9 @@ const config = {
big: 'var(--c--theme--colors--primary-text)',
},
},
'forms-radio': {
'accent-color': 'var(--c--theme--colors--primary-600)',
},
'forms-select': {
'item-font-size': '14px',
'border-radius': '4px',
Expand Down
40 changes: 24 additions & 16 deletions src/frontend/apps/impress/src/components/Text.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,9 @@
import { CSSProperties, ComponentPropsWithRef, ReactHTML } from 'react';
import {
CSSProperties,
ComponentPropsWithRef,
ReactHTML,
forwardRef,
} from 'react';
import styled from 'styled-components';

import { tokens } from '@/cunningham';
Expand Down Expand Up @@ -55,18 +60,21 @@ export const TextStyled = styled(Box)<TextProps>`
`white-space: nowrap; overflow: hidden; text-overflow: ellipsis;`}
`;

export const Text = ({
className,
$isMaterialIcon,
...props
}: ComponentPropsWithRef<typeof TextStyled>) => {
return (
<TextStyled
as="span"
$theme="greyscale"
$variation="text"
className={`${className || ''}${$isMaterialIcon ? ' material-icons' : ''}`}
{...props}
/>
);
};
const Text = forwardRef<HTMLElement, ComponentPropsWithRef<typeof TextStyled>>(
({ className, $isMaterialIcon, ...props }, ref) => {
return (
<TextStyled
ref={ref}
as="span"
$theme="greyscale"
$variation="text"
className={`${className || ''}${$isMaterialIcon ? ' material-icons' : ''}`}
{...props}
/>
);
},
);

Text.displayName = 'Text';

export { Text };
6 changes: 6 additions & 0 deletions src/frontend/apps/impress/src/cunningham/cunningham-style.css
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,12 @@
line-height: initial;
}

.c__field .c__field__footer {
padding: 2px 0 0;
font-size: var(--c--components--forms-field--footer-font-size);
color: var(--c--components--forms-field--footer-color);
}

.labelled-box label {
color: var(--c--theme--colors--primary-text);
}
Expand Down
Loading

0 comments on commit 7458ed8

Please sign in to comment.