diff --git a/components/src/components/atoms/Button/Button.tsx b/components/src/components/atoms/Button/Button.tsx index aa3ba492..67126b86 100644 --- a/components/src/components/atoms/Button/Button.tsx +++ b/components/src/components/atoms/Button/Button.tsx @@ -47,6 +47,8 @@ type BaseProps = { shadowless?: boolean /** If true, adds an outline to the button */ outlined?: boolean + /** If true, makes inner div full width*/ + fullWidthContent?: boolean /** The handler for click events. */ onClick?: NativeButtonProps['onClick'] } & Omit @@ -318,11 +320,14 @@ const PrefixContainer = styled.div( const LoadingContainer = styled.div(() => css``) -const LabelContainer = styled(Typography)( - ({ theme }) => css` +const LabelContainer = styled(Typography)<{ + $fullWidthContent: boolean +}>( + ({ theme, $fullWidthContent }) => css` color: inherit; font-size: inherit; font-weight: ${theme.fontWeights['semiBold']}; + ${$fullWidthContent && `width: 100%;`} `, ) @@ -353,12 +358,17 @@ export const Button = React.forwardRef( pressed = false, shadowless = false, outlined = false, + fullWidthContent = false, as: asProp, ...props }: Props, ref: React.Ref, ) => { - const labelContent = {children} + const labelContent = ( + + {children} + + ) let childContent: ReactNodeNoStrings if (shape) { childContent = loading ? : labelContent @@ -371,7 +381,6 @@ export const Button = React.forwardRef( )} {labelContent} - {(loading || suffix) && ( {loading ? : suffix} @@ -385,6 +394,7 @@ export const Button = React.forwardRef( + + + + + + + + + \ No newline at end of file diff --git a/components/src/icons/FlameBurned.svg b/components/src/icons/FlameBurned.svg new file mode 100644 index 00000000..2a9fa717 --- /dev/null +++ b/components/src/icons/FlameBurned.svg @@ -0,0 +1,10 @@ + + + + + + + + + + \ No newline at end of file diff --git a/components/src/icons/index.tsx b/components/src/icons/index.tsx index 86d11c6c..08db1bcb 100644 --- a/components/src/icons/index.tsx +++ b/components/src/icons/index.tsx @@ -24,6 +24,8 @@ export { ReactComponent as EthTransparentInvertedSVG } from './EthTransparentInv export { ReactComponent as ExclamationSVG } from './Exclamation.svg' export { ReactComponent as ExitSVG } from './Exit.svg' export { ReactComponent as FlagSVG } from './Flag.svg' +export { ReactComponent as FlameSVG } from './Flame.svg' +export { ReactComponent as FlameBurnedSVG } from './FlameBurned.svg' export { ReactComponent as GradientSVG } from './Gradient.svg' export { ReactComponent as GridSVG } from './Grid.svg' export { ReactComponent as GridSolidSVG } from './GridSolid.svg' diff --git a/components/src/index.test.ts b/components/src/index.test.ts index dc3bfdaf..4896f3cb 100644 --- a/components/src/index.test.ts +++ b/components/src/index.test.ts @@ -73,6 +73,8 @@ const expectedExportedKeys = [ 'ExclamationSVG', 'ExitSVG', 'FlagSVG', + 'FlameSVG', + 'FlameBurnedSVG', 'GradientSVG', 'GridSVG', 'GridSolidSVG', diff --git a/docs/src/components/CodeBlock.tsx b/docs/src/components/CodeBlock.tsx index e3f7e6d9..c5478eb9 100644 --- a/docs/src/components/CodeBlock.tsx +++ b/docs/src/components/CodeBlock.tsx @@ -12,6 +12,7 @@ import { Colors } from '@ensdomains/thorin' import { useIsMounted } from '~/utils/isMounted' import { PlayroomStateProvider } from '~/playroom/PlayroomState' + import { CopyButton } from './CopyButton' import type { Props as CodePreviewProps } from './CodePreview' diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 236bb1c8..a82dcbb7 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -233,7 +233,7 @@ importers: copy-to-clipboard: 3.3.2 gray-matter: 4.0.3 lodash: 4.17.21 - next: 12.2.4_sfoxds7t5ydpegc3knd667wn6m + next: 12.2.5_sfoxds7t5ydpegc3knd667wn6m next-mdx-remote: 3.0.8_sfoxds7t5ydpegc3knd667wn6m nookies: 2.5.2 playroom: 0.27.7_sfoxds7t5ydpegc3knd667wn6m @@ -2306,8 +2306,8 @@ packages: /@mdx-js/util/1.6.22: resolution: {integrity: sha512-H1rQc1ZOHANWBvPcW+JpGwr+juXSxM8Q8YCkm3GhZd8REu1fHR3z99CErO1p9pkcfcxZnMdIZdIsXkOHY0NilA==} - /@next/env/12.2.4: - resolution: {integrity: sha512-/gApFXWk5CCLFQJL5IYJXxPQuG5tz5nPX4l27A9Zm/+wJxiwFrRSP54AopDxIv4JRp/rGwcgk/lZS/0Clw8jYA==} + /@next/env/12.2.5: + resolution: {integrity: sha512-vLPLV3cpPGjUPT3PjgRj7e3nio9t6USkuew3JE/jMeon/9Mvp1WyR18v3iwnCuX7eUAm1HmAbJHHLAbcu/EJcw==} dev: false /@next/eslint-plugin-next/12.0.1: @@ -2326,8 +2326,8 @@ packages: '@mdx-js/react': 1.6.22_react@17.0.2 dev: true - /@next/swc-android-arm-eabi/12.2.4: - resolution: {integrity: sha512-P4YSFNpmXXSnn3P1qsOAqz+MX3On9fHrlc8ovb/CFJJoU+YLCR53iCEwfw39e0IZEgDA7ttgr108plF8mxaX0g==} + /@next/swc-android-arm-eabi/12.2.5: + resolution: {integrity: sha512-cPWClKxGhgn2dLWnspW+7psl3MoLQUcNqJqOHk2BhNcou9ARDtC0IjQkKe5qcn9qg7I7U83Gp1yh2aesZfZJMA==} engines: {node: '>= 10'} cpu: [arm] os: [android] @@ -2335,8 +2335,8 @@ packages: dev: false optional: true - /@next/swc-android-arm64/12.2.4: - resolution: {integrity: sha512-4o2n14E18O+8xHlf6dgJsWPXN9gmSmfIe2Z0EqKDIPBBkFt/2CyrH0+vwHnL2l7xkDHhOGfZYcYIWVUR5aNu0A==} + /@next/swc-android-arm64/12.2.5: + resolution: {integrity: sha512-vMj0efliXmC5b7p+wfcQCX0AfU8IypjkzT64GiKJD9PgiA3IILNiGJr1fw2lyUDHkjeWx/5HMlMEpLnTsQslwg==} engines: {node: '>= 10'} cpu: [arm64] os: [android] @@ -2344,8 +2344,8 @@ packages: dev: false optional: true - /@next/swc-darwin-arm64/12.2.4: - resolution: {integrity: sha512-DcUO6MGBL9E3jj5o86MUnTOy4WawIJJhyCcFYO4f51sbl7+uPIYIx40eo98A6NwJEXazCqq1hLeqOaNTAIvDiQ==} + /@next/swc-darwin-arm64/12.2.5: + resolution: {integrity: sha512-VOPWbO5EFr6snla/WcxUKtvzGVShfs302TEMOtzYyWni6f9zuOetijJvVh9CCTzInnXAZMtHyNhefijA4HMYLg==} engines: {node: '>= 10'} cpu: [arm64] os: [darwin] @@ -2353,8 +2353,8 @@ packages: dev: false optional: true - /@next/swc-darwin-x64/12.2.4: - resolution: {integrity: sha512-IUlFMqeLjdIzDorrGC2Dt+2Ae3DbKQbRzCzmDq4/CP1+jJGeDXo/2AHnlE+WYnwQAC4KtAz6pbVnd3KstZWsVA==} + /@next/swc-darwin-x64/12.2.5: + resolution: {integrity: sha512-5o8bTCgAmtYOgauO/Xd27vW52G2/m3i5PX7MUYePquxXAnX73AAtqA3WgPXBRitEB60plSKZgOTkcpqrsh546A==} engines: {node: '>= 10'} cpu: [x64] os: [darwin] @@ -2362,8 +2362,8 @@ packages: dev: false optional: true - /@next/swc-freebsd-x64/12.2.4: - resolution: {integrity: sha512-475vwyWcjnyDVDWLgAATP0HI8W1rwByc+uXk1B6KkAVFhkoDgH387LW0uNqxavK+VxCzj3avQXX/58XDvxtSlg==} + /@next/swc-freebsd-x64/12.2.5: + resolution: {integrity: sha512-yYUbyup1JnznMtEBRkK4LT56N0lfK5qNTzr6/DEyDw5TbFVwnuy2hhLBzwCBkScFVjpFdfiC6SQAX3FrAZzuuw==} engines: {node: '>= 10'} cpu: [x64] os: [freebsd] @@ -2371,8 +2371,8 @@ packages: dev: false optional: true - /@next/swc-linux-arm-gnueabihf/12.2.4: - resolution: {integrity: sha512-qZW+L3iG3XSGtlOPmD5RRWXyk6ZNdscLV0BQjuDvP+exTg+uixqHXOHz0/GVATIJEBQOF0Kew7jAXVXEP+iRTQ==} + /@next/swc-linux-arm-gnueabihf/12.2.5: + resolution: {integrity: sha512-2ZE2/G921Acks7UopJZVMgKLdm4vN4U0yuzvAMJ6KBavPzqESA2yHJlm85TV/K9gIjKhSk5BVtauIUntFRP8cg==} engines: {node: '>= 10'} cpu: [arm] os: [linux] @@ -2380,8 +2380,8 @@ packages: dev: false optional: true - /@next/swc-linux-arm64-gnu/12.2.4: - resolution: {integrity: sha512-fEPRjItWYaKyyG9N+2HIA59OBHIhk7WC+Rh+LwXsh0pQe870Ykpek3KQs0umjsrEGe57NyMomq3f80/N8taDvA==} + /@next/swc-linux-arm64-gnu/12.2.5: + resolution: {integrity: sha512-/I6+PWVlz2wkTdWqhlSYYJ1pWWgUVva6SgX353oqTh8njNQp1SdFQuWDqk8LnM6ulheVfSsgkDzxrDaAQZnzjQ==} engines: {node: '>= 10'} cpu: [arm64] os: [linux] @@ -2389,8 +2389,8 @@ packages: dev: false optional: true - /@next/swc-linux-arm64-musl/12.2.4: - resolution: {integrity: sha512-rnCTzXII0EBCcFn9P5s/Dho2kPUMSX/bP0iOAj8wEI/IxUEfEElbin89zJoNW30cycHu19xY8YP4K2+hzciPzQ==} + /@next/swc-linux-arm64-musl/12.2.5: + resolution: {integrity: sha512-LPQRelfX6asXyVr59p5sTpx5l+0yh2Vjp/R8Wi4X9pnqcayqT4CUJLiHqCvZuLin3IsFdisJL0rKHMoaZLRfmg==} engines: {node: '>= 10'} cpu: [arm64] os: [linux] @@ -2398,8 +2398,8 @@ packages: dev: false optional: true - /@next/swc-linux-x64-gnu/12.2.4: - resolution: {integrity: sha512-PhXX6NSuIuhHInxPY2VkG2Bl7VllsD3Cjx+pQcS1wTym7Zt7UoLvn05PkRrkiyIkvR+UXnqPUM3TYiSbnemXEw==} + /@next/swc-linux-x64-gnu/12.2.5: + resolution: {integrity: sha512-0szyAo8jMCClkjNK0hknjhmAngUppoRekW6OAezbEYwHXN/VNtsXbfzgYOqjKWxEx3OoAzrT3jLwAF0HdX2MEw==} engines: {node: '>= 10'} cpu: [x64] os: [linux] @@ -2407,8 +2407,8 @@ packages: dev: false optional: true - /@next/swc-linux-x64-musl/12.2.4: - resolution: {integrity: sha512-GmC/QROiUZpFirHRfPQqMyCXZ+5+ndbBZrMvL74HtQB/CKXB8K1VM+rvy9Gp/5OaU8Rxp48IcX79NOfI2LiXlA==} + /@next/swc-linux-x64-musl/12.2.5: + resolution: {integrity: sha512-zg/Y6oBar1yVnW6Il1I/08/2ukWtOG6s3acdJdEyIdsCzyQi4RLxbbhkD/EGQyhqBvd3QrC6ZXQEXighQUAZ0g==} engines: {node: '>= 10'} cpu: [x64] os: [linux] @@ -2416,8 +2416,8 @@ packages: dev: false optional: true - /@next/swc-win32-arm64-msvc/12.2.4: - resolution: {integrity: sha512-9XKoCXbNZuaMRPtcKQz3+hgVpkMosaLlcxHFXT8/j4w61k7/qvEbrkMDS9WHNrD/xVcLycwhPRgXcns2K1BdBQ==} + /@next/swc-win32-arm64-msvc/12.2.5: + resolution: {integrity: sha512-3/90DRNSqeeSRMMEhj4gHHQlLhhKg5SCCoYfE3kBjGpE63EfnblYUqsszGGZ9ekpKL/R4/SGB40iCQr8tR5Jiw==} engines: {node: '>= 10'} cpu: [arm64] os: [win32] @@ -2425,8 +2425,8 @@ packages: dev: false optional: true - /@next/swc-win32-ia32-msvc/12.2.4: - resolution: {integrity: sha512-hEyRieZKH9iw4AzvXaQ+Fyb98k0G/o9QcRGxA1/O/O/elf1+Qvuwb15phT8GbVtIeNziy66XTPOhKKfdr8KyUg==} + /@next/swc-win32-ia32-msvc/12.2.5: + resolution: {integrity: sha512-hGLc0ZRAwnaPL4ulwpp4D2RxmkHQLuI8CFOEEHdzZpS63/hMVzv81g8jzYA0UXbb9pus/iTc3VRbVbAM03SRrw==} engines: {node: '>= 10'} cpu: [ia32] os: [win32] @@ -2434,8 +2434,8 @@ packages: dev: false optional: true - /@next/swc-win32-x64-msvc/12.2.4: - resolution: {integrity: sha512-5Pl1tdMJWLy4rvzU1ecx0nHWgDPqoYuvYoXE/5X0Clu9si/yOuBIj573F2kOTY7mu0LX2wgCJVSnyK0abHBxIw==} + /@next/swc-win32-x64-msvc/12.2.5: + resolution: {integrity: sha512-7h5/ahY7NeaO2xygqVrSG/Y8Vs4cdjxIjowTZ5W6CKoTKn7tmnuxlUc2h74x06FKmbhAd9agOjr/AOKyxYYm9Q==} engines: {node: '>= 10'} cpu: [x64] os: [win32] @@ -4444,7 +4444,7 @@ packages: engines: {node: ^6 || ^7 || ^8 || ^9 || ^10 || ^11 || ^12 || >=13.7} hasBin: true dependencies: - caniuse-lite: 1.0.30001344 + caniuse-lite: 1.0.30001373 electron-to-chromium: 1.4.144 escalade: 3.1.1 node-releases: 2.0.5 @@ -4560,6 +4560,7 @@ packages: /caniuse-lite/1.0.30001344: resolution: {integrity: sha512-0ZFjnlCaXNOAYcV7i+TtdKBp0L/3XEU2MF/x6Du1lrh+SRX4IfzIVL4HNJg5pB2PmFb8rszIGyOvsZnqqRoc2g==} + dev: true /caniuse-lite/1.0.30001373: resolution: {integrity: sha512-pJYArGHrPp3TUqQzFYRmP/lwJlj8RCbVe3Gd3eJQkAV8SAC6b19XS9BjMvRdvaS8RMkaTN8ZhoHP6S1y8zzwEQ==} @@ -8912,8 +8913,8 @@ packages: - supports-color dev: false - /next/12.2.4_sfoxds7t5ydpegc3knd667wn6m: - resolution: {integrity: sha512-b1xlxEozmAWokAXzXsi5vlmU/IfJcFNIJA8dpU5UdkFbyDPio8wwb8mAQ/Y7rGtfTgG/t/u49BiyEA+xAgFvow==} + /next/12.2.5_sfoxds7t5ydpegc3knd667wn6m: + resolution: {integrity: sha512-tBdjqX5XC/oFs/6gxrZhjmiq90YWizUYU6qOWAfat7zJwrwapJ+BYgX2PmiacunXMaRpeVT4vz5MSPSLgNkrpA==} engines: {node: '>=12.22.0'} hasBin: true peerDependencies: @@ -8930,28 +8931,28 @@ packages: sass: optional: true dependencies: - '@next/env': 12.2.4 + '@next/env': 12.2.5 '@swc/helpers': 0.4.3 caniuse-lite: 1.0.30001373 postcss: 8.4.14 react: 17.0.2 react-dom: 17.0.2_react@17.0.2 - styled-jsx: 5.0.2_react@17.0.2 + styled-jsx: 5.0.4_react@17.0.2 use-sync-external-store: 1.2.0_react@17.0.2 optionalDependencies: - '@next/swc-android-arm-eabi': 12.2.4 - '@next/swc-android-arm64': 12.2.4 - '@next/swc-darwin-arm64': 12.2.4 - '@next/swc-darwin-x64': 12.2.4 - '@next/swc-freebsd-x64': 12.2.4 - '@next/swc-linux-arm-gnueabihf': 12.2.4 - '@next/swc-linux-arm64-gnu': 12.2.4 - '@next/swc-linux-arm64-musl': 12.2.4 - '@next/swc-linux-x64-gnu': 12.2.4 - '@next/swc-linux-x64-musl': 12.2.4 - '@next/swc-win32-arm64-msvc': 12.2.4 - '@next/swc-win32-ia32-msvc': 12.2.4 - '@next/swc-win32-x64-msvc': 12.2.4 + '@next/swc-android-arm-eabi': 12.2.5 + '@next/swc-android-arm64': 12.2.5 + '@next/swc-darwin-arm64': 12.2.5 + '@next/swc-darwin-x64': 12.2.5 + '@next/swc-freebsd-x64': 12.2.5 + '@next/swc-linux-arm-gnueabihf': 12.2.5 + '@next/swc-linux-arm64-gnu': 12.2.5 + '@next/swc-linux-arm64-musl': 12.2.5 + '@next/swc-linux-x64-gnu': 12.2.5 + '@next/swc-linux-x64-musl': 12.2.5 + '@next/swc-win32-arm64-msvc': 12.2.5 + '@next/swc-win32-ia32-msvc': 12.2.5 + '@next/swc-win32-x64-msvc': 12.2.5 transitivePeerDependencies: - '@babel/core' - babel-plugin-macros @@ -11216,8 +11217,8 @@ packages: shallowequal: 1.1.0 supports-color: 5.5.0 - /styled-jsx/5.0.2_react@17.0.2: - resolution: {integrity: sha512-LqPQrbBh3egD57NBcHET4qcgshPks+yblyhPlH2GY8oaDgKs8SK4C3dBh3oSJjgzJ3G5t1SYEZGHkP+QEpX9EQ==} + /styled-jsx/5.0.4_react@17.0.2: + resolution: {integrity: sha512-sDFWLbg4zR+UkNzfk5lPilyIgtpddfxXEULxhujorr5jtePTUqiPDc5BC0v1NRqTr/WaFBGQQUoYToGlF4B2KQ==} engines: {node: '>= 12.0.0'} peerDependencies: '@babel/core': '*' @@ -11880,6 +11881,7 @@ packages: /unified/9.2.0: resolution: {integrity: sha512-vx2Z0vY+a3YoTj8+pttM3tiJHCwY5UFbYdiWrwBEbHmK8pvsPj2rtAX2BFfgXen8T39CJWblWRDT4L5WGXtDdg==} dependencies: + '@types/unist': 2.0.6 bail: 1.0.5 extend: 3.0.2 is-buffer: 2.0.5 @@ -11890,6 +11892,7 @@ packages: /unified/9.2.2: resolution: {integrity: sha512-Sg7j110mtefBD+qunSLO1lqOEKdrwBFBrR6Qd8f4uwkhWNlbkaqwHse6e7QvD3AP/MNoJdEDLaf8OxYyoWgorQ==} dependencies: + '@types/unist': 2.0.6 bail: 1.0.5 extend: 3.0.2 is-buffer: 2.0.5