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

IconLicence: Add component #1640

Merged
merged 4 commits into from
Oct 29, 2024
Merged
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
17 changes: 17 additions & 0 deletions .changeset/beige-eels-cheer.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
---
'braid-design-system': minor
---

---
updated:
- IconLicence
---

**IconLicence:** Add component

Add `IconLicence` to icon suite

**EXAMPLE USAGE:**
```jsx
<IconLicence />
```
6 changes: 6 additions & 0 deletions packages/braid-design-system/icons/licence.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
import React from 'react';
import type { ComponentDocs } from 'site/types';
import { iconDocumentation } from '../iconCommon.docs';
import source from '@braid-design-system/source.macro';
import { IconLicence, Heading, Stack } from '../../';

const docs: ComponentDocs = {
category: 'Icon',
Example: () =>
source(
<Stack space="none" align="center">
<Heading component="div" level="1">
<IconLicence />
</Heading>
</Stack>,
),
alternatives: [],
additional: [iconDocumentation],
};

export default docs;
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
import React from 'react';
import { Box } from '../../Box/Box';
import { IconContainer, type IconContainerProps } from '../IconContainer';
import { IconLicenceSvg } from './IconLicenceSvg';

export type IconLicenceProps = IconContainerProps;

export const IconLicence = (props: IconLicenceProps) => (
<IconContainer {...props}>
{(svgProps) => <Box component={IconLicenceSvg} {...svgProps} />}
</IconContainer>
);
Original file line number Diff line number Diff line change
Expand Up @@ -1050,6 +1050,32 @@ export const IconLanguageSvg = ({ title, titleId, ...props }: SVGProps) => (
"
`;

exports[`IconLicenceSvg should match snapshot 1`] = `
"import React from 'react';

import type { SVGProps } from '../SVGTypes';

export const IconLicenceSvg = ({ title, titleId, ...props }: SVGProps) => (
<svg
xmlns="http://www.w3.org/2000/svg"
viewBox="0 0 24 24"
focusable="false"
fill="currentColor"
width={16}
height={16}
aria-labelledby={titleId}
{...props}
>
{title ? <title id={titleId}>{title}</title> : null}
<path d="M19 4H5C3.346 4 2 5.346 2 7v10c0 1.654 1.346 3 3 3h14c1.654 0 3-1.346 3-3V7c0-1.654-1.346-3-3-3Zm1 13a1 1 0 0 1-1 1H5a1 1 0 0 1-1-1V7a1 1 0 0 1 1-1h14a1 1 0 0 1 1 1v10Z" />
<path d="M17 8h-3a1 1 0 1 0 0 2h3a1 1 0 1 0 0-2Zm0 4h-3a1 1 0 1 0 0 2h3a1 1 0 1 0 0-2Z" />
<circle cx={9} cy={10} r={2} />
<path d="M10 13H8a2 2 0 0 0-2 2v1h6v-1a2 2 0 0 0-2-2Z" />
</svg>
);
"
`;

exports[`IconLinkBrokenSvg should match snapshot 1`] = `
"import React from 'react';

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@ export { IconImage } from './IconImage/IconImage';
export { IconInfo } from './IconInfo/IconInfo';
export { IconInvoice } from './IconInvoice/IconInvoice';
export { IconLanguage } from './IconLanguage/IconLanguage';
export { IconLicence } from './IconLicence/IconLicence';
export { IconLink } from './IconLink/IconLink';
export { IconLinkBroken } from './IconLinkBroken/IconLinkBroken';
export { IconList } from './IconList/IconList';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4738,6 +4738,37 @@ exports[`IconLanguage 1`] = `
}
`;

exports[`IconLicence 1`] = `
{
exportType: component,
props: {
alignY?:
| "lowercase"
| "uppercase"
data?: DataAttributeMap
size?:
| "fill"
| "large"
| "small"
| "standard"
| "xsmall"
title?: string
titleId?: string
tone?:
| "brandAccent"
| "caution"
| "critical"
| "formAccent"
| "info"
| "link"
| "neutral"
| "positive"
| "promote"
| "secondary"
},
}
`;

exports[`IconLink 1`] = `
{
exportType: component,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,14 @@ export const iconsKeywords: Record<IconName, NonEmptyArray<string>> = {
IconInvoice: ['bill', 'payment', 'receipt'],
IconLanguage: ['translate', 'letters'],
IconLink: ['chain'],
IconLicence: [
'card',
'permit',
'identity',
'identification',
'certification',
felixhabib marked this conversation as resolved.
Show resolved Hide resolved
'license',
],
IconLinkBroken: ['brokenlink', 'chain', 'broken', 'error'],
IconList: ['lines', 'queue', 'stack'],
IconLocation: ['pin', 'marker', 'place', 'map', 'gps'],
Expand Down