Skip to content

Commit

Permalink
IconLicense: Add component
Browse files Browse the repository at this point in the history
  • Loading branch information
felixhabib committed Oct 29, 2024
1 parent fc1f5f7 commit e5499ff
Show file tree
Hide file tree
Showing 7 changed files with 109 additions and 0 deletions.
12 changes: 12 additions & 0 deletions .changeset/beige-eels-cheer.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
---
'braid-design-system': minor
---

---
updated:
- IconLicense
---

**IconLicense:** Add component

Add `IconLicense` to icon suite
6 changes: 6 additions & 0 deletions packages/braid-design-system/icons/license.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 { IconLicense, Heading, Stack } from '../../';

const docs: ComponentDocs = {
category: 'Icon',
Example: () =>
source(
<Stack space="none" align="center">
<Heading component="div" level="1">
<IconLicense />
</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 { IconLicenseSvg } from './IconLicenseSvg';

export type IconLicenseProps = IconContainerProps;

export const IconLicense = (props: IconLicenseProps) => (
<IconContainer {...props}>
{(svgProps) => <Box component={IconLicenseSvg} {...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[`IconLicenseSvg should match snapshot 1`] = `
"import React from 'react';
import type { SVGProps } from '../SVGTypes';
export const IconLicenseSvg = ({ 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 { IconLicense } from './IconLicense/IconLicense';
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[`IconLicense 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

0 comments on commit e5499ff

Please sign in to comment.