From e5499ff726ffb8ddde19c5e177e479be3dc3ae4b Mon Sep 17 00:00:00 2001 From: Felix Habib Date: Tue, 29 Oct 2024 14:09:23 +1100 Subject: [PATCH] IconLicense: Add component --- .changeset/beige-eels-cheer.md | 12 +++++++ .../braid-design-system/icons/license.svg | 6 ++++ .../icons/IconLicense/IconLicense.docs.tsx | 21 +++++++++++++ .../icons/IconLicense/IconLicense.tsx | 12 +++++++ .../icons/__snapshots__/icons.test.ts.snap | 26 ++++++++++++++++ .../src/lib/components/icons/index.ts | 1 + .../src/__snapshots__/contract.test.ts.snap | 31 +++++++++++++++++++ 7 files changed, 109 insertions(+) create mode 100644 .changeset/beige-eels-cheer.md create mode 100644 packages/braid-design-system/icons/license.svg create mode 100644 packages/braid-design-system/src/lib/components/icons/IconLicense/IconLicense.docs.tsx create mode 100644 packages/braid-design-system/src/lib/components/icons/IconLicense/IconLicense.tsx diff --git a/.changeset/beige-eels-cheer.md b/.changeset/beige-eels-cheer.md new file mode 100644 index 00000000000..7a74652bf88 --- /dev/null +++ b/.changeset/beige-eels-cheer.md @@ -0,0 +1,12 @@ +--- +'braid-design-system': minor +--- + +--- +updated: + - IconLicense +--- + +**IconLicense:** Add component + +Add `IconLicense` to icon suite diff --git a/packages/braid-design-system/icons/license.svg b/packages/braid-design-system/icons/license.svg new file mode 100644 index 00000000000..35eed073d5d --- /dev/null +++ b/packages/braid-design-system/icons/license.svg @@ -0,0 +1,6 @@ + + + + + + diff --git a/packages/braid-design-system/src/lib/components/icons/IconLicense/IconLicense.docs.tsx b/packages/braid-design-system/src/lib/components/icons/IconLicense/IconLicense.docs.tsx new file mode 100644 index 00000000000..e8db540612d --- /dev/null +++ b/packages/braid-design-system/src/lib/components/icons/IconLicense/IconLicense.docs.tsx @@ -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( + + + + + , + ), + alternatives: [], + additional: [iconDocumentation], +}; + +export default docs; diff --git a/packages/braid-design-system/src/lib/components/icons/IconLicense/IconLicense.tsx b/packages/braid-design-system/src/lib/components/icons/IconLicense/IconLicense.tsx new file mode 100644 index 00000000000..800f09f4ea5 --- /dev/null +++ b/packages/braid-design-system/src/lib/components/icons/IconLicense/IconLicense.tsx @@ -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) => ( + + {(svgProps) => } + +); diff --git a/packages/braid-design-system/src/lib/components/icons/__snapshots__/icons.test.ts.snap b/packages/braid-design-system/src/lib/components/icons/__snapshots__/icons.test.ts.snap index e778afbcd89..8cf6269c7e2 100644 --- a/packages/braid-design-system/src/lib/components/icons/__snapshots__/icons.test.ts.snap +++ b/packages/braid-design-system/src/lib/components/icons/__snapshots__/icons.test.ts.snap @@ -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) => ( + + {title ? {title} : null} + + + + + +); +" +`; + exports[`IconLinkBrokenSvg should match snapshot 1`] = ` "import React from 'react'; diff --git a/packages/braid-design-system/src/lib/components/icons/index.ts b/packages/braid-design-system/src/lib/components/icons/index.ts index 6b05805bcee..4f6b4eba9f9 100644 --- a/packages/braid-design-system/src/lib/components/icons/index.ts +++ b/packages/braid-design-system/src/lib/components/icons/index.ts @@ -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'; diff --git a/packages/generate-component-docs/src/__snapshots__/contract.test.ts.snap b/packages/generate-component-docs/src/__snapshots__/contract.test.ts.snap index e3a1ae17f22..d59620f0442 100644 --- a/packages/generate-component-docs/src/__snapshots__/contract.test.ts.snap +++ b/packages/generate-component-docs/src/__snapshots__/contract.test.ts.snap @@ -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,