Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore(apps): svg ids, parsing #3316

Open
wants to merge 4 commits into
base: next
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
154 changes: 35 additions & 119 deletions apps/_components/src/logos/Bronnoysund.tsx

Large diffs are not rendered by default.

7 changes: 1 addition & 6 deletions apps/_components/src/logos/Figma.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ export function Figma(rest: FigmaProps) {
xmlns='http://www.w3.org/2000/svg'
{...rest}
>
<g clipPath='url(#clip0_38_168)'>
<g>
<path
d='M15.3321 8.66788C16.1984 8.64188 17.0204 8.27949 17.624 7.65755C18.2275 7.03561 18.5651 6.20304 18.5651 5.33638C18.5651 4.46973 18.2275 3.63715 17.624 3.01521C17.0204 2.39327 16.1984 2.03088 15.3321 2.00488H8.66809C7.80183 2.03088 6.97976 2.39327 6.3762 3.01521C5.77265 3.63715 5.43508 4.46973 5.43508 5.33638C5.43508 6.20304 5.77265 7.03561 6.3762 7.65755C6.97976 8.27949 7.80183 8.64188 8.66809 8.66788C7.79426 8.68302 6.96133 9.04078 6.34871 9.6641C5.7361 10.2874 5.39282 11.1264 5.39282 12.0004C5.39282 12.8744 5.7361 13.7134 6.34871 14.3367C6.96133 14.96 7.79426 15.3177 8.66809 15.3329C7.79852 15.3542 6.97174 15.7146 6.36426 16.3371C5.75677 16.9597 5.41673 17.7951 5.41673 18.6649C5.41673 19.5347 5.75677 20.3701 6.36426 20.9926C6.97174 21.6152 7.79852 21.9756 8.66809 21.9969C9.5518 21.9964 10.3992 21.645 11.0239 21.02C11.6487 20.3951 11.9998 19.5476 12.0001 18.6639V8.66788H15.3321Z'
fill='#202C3D'
Expand All @@ -20,11 +20,6 @@ export function Figma(rest: FigmaProps) {
fill='#202C3D'
/>
</g>
<defs>
<clipPath id='clip0_38_168'>
<rect width='24' height='24' fill='white' />
</clipPath>
</defs>
</svg>
);
}
12 changes: 1 addition & 11 deletions apps/_components/src/logos/Github.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -10,24 +10,14 @@ export function Github(rest: GithubProps) {
xmlns='http://www.w3.org/2000/svg'
{...rest}
>
<g clipPath='url(#clip0_38_169)'>
<g>
<path
fillRule='evenodd'
clipRule='evenodd'
d='M12 2C6.475 2 2 6.475 2 12C2 16.425 4.8625 20.1625 8.8375 21.4875C9.3375 21.575 9.525 21.275 9.525 21.0125C9.525 20.775 9.5125 19.9875 9.5125 19.15C7 19.6125 6.35 18.5375 6.15 17.975C6.0375 17.6875 5.55 16.8 5.125 16.5625C4.775 16.375 4.275 15.9125 5.1125 15.9C5.9 15.8875 6.4625 16.625 6.65 16.925C7.55 18.4375 8.9875 18.0125 9.5625 17.75C9.65 17.1 9.9125 16.6625 10.2 16.4125C7.975 16.1625 5.65 15.3 5.65 11.475C5.65 10.3875 6.0375 9.4875 6.675 8.7875C6.575 8.5375 6.225 7.5125 6.775 6.1375C6.775 6.1375 7.6125 5.875 9.525 7.1625C10.325 6.9375 11.175 6.825 12.025 6.825C12.875 6.825 13.725 6.9375 14.525 7.1625C16.4375 5.8625 17.275 6.1375 17.275 6.1375C17.825 7.5125 17.475 8.5375 17.375 8.7875C18.0125 9.4875 18.4 10.375 18.4 11.475C18.4 15.3125 16.0625 16.1625 13.8375 16.4125C14.2 16.725 14.5125 17.325 14.5125 18.2625C14.5125 19.6 14.5 20.675 14.5 21.0125C14.5 21.275 14.6875 21.5875 15.1875 21.4875C19.1375 20.1625 22 16.4125 22 12C22 6.475 17.525 2 12 2Z'
fill='#202C3D'
/>
</g>
<defs>
<clipPath id='clip0_38_169'>
<rect
width='20'
height='20'
fill='white'
transform='translate(2 2)'
/>
</clipPath>
</defs>
</svg>
);
}
7 changes: 1 addition & 6 deletions apps/_components/src/logos/Udir.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,7 @@ type UdirProps = React.HTMLAttributes<SVGElement>;

export function Udir(rest: UdirProps) {
return (
<svg
id='Layer_1'
xmlns='http://www.w3.org/2000/svg'
viewBox='0 0 694.96 200'
{...rest}
>
<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 694.96 200' {...rest}>
<title>Utdanningsdirektoratet logo</title>
<g>
<g>
Expand Down
10 changes: 5 additions & 5 deletions apps/theme/components/ColorInput/ColorInput.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -20,13 +20,13 @@ export const ColorInput = ({ name, color, onClick }: ColorInputProps) => {
data-color='neutral'
aria-label={`Endre instillinger ${name}`}
>
<div className={classes.leftContent}>
<div
<span className={classes.leftContent}>
<span
style={{ backgroundColor: color }}
className={classes.color}
></div>
<div className={classes.hex}>{color}</div>
</div>
></span>
<span className={classes.hex}>{color}</span>
</span>
<PencilIcon className={classes.icon} aria-hidden fontSize='1.5rem' />
</Button>
</div>
Expand Down
1 change: 0 additions & 1 deletion apps/theme/components/ColorPreview/ColorPreview.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,6 @@ export const ColorPreview = () => {
<div
style={generateColorVars(color.colors, colorScheme)}
className={classes.card}
id='preview'
>
<Heading className={classes.title} data-size='2xs'>
{color.name}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -62,9 +62,9 @@ export const OverviewComponents = forwardRef<HTMLDivElement>(
<img className={classes.img} src='img/city.png' alt='' />
<div className={classes.imgText}>
<div className={classes.tags} data-size='sm'>
<Tag color='brand1'>Sport</Tag>
<Tag color='brand2'>Nyheter</Tag>
<Tag color='brand3'>Innenriks</Tag>
<Tag data-color='brand1'>Sport</Tag>
<Tag data-color='brand2'>Nyheter</Tag>
<Tag data-color='brand3'>Innenriks</Tag>
</div>
<Heading data-size='2xs' className={classes.imgTitle}>
Reiste alene til storbyen
Expand Down
4 changes: 2 additions & 2 deletions apps/theme/components/Sidebar/ColorPane/ColorPane.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -149,7 +149,7 @@ export const ColorPane = ({
<div className={classes.btnGroup}>
<Button
data-size='sm'
color='neutral'
data-color='neutral'
onClick={() => {
/* Check here as well to disable sending new color */
if (!checkNameIsValid()) return;
Expand All @@ -161,7 +161,7 @@ export const ColorPane = ({

<Button
data-size='sm'
color='neutral'
data-color='neutral'
variant='secondary'
onClick={closeTab}
>
Expand Down
Loading