@mrshmllw/smores-react 13.3.5 → 13.3.6

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -4,7 +4,6 @@ import { Box } from '../Box';
4
4
  import { useTimeout } from '../hooks';
5
5
  import { Icon } from '../Icon';
6
6
  import { Text } from '../Text';
7
- import { theme } from '../theme';
8
7
  export const SnackbarItem = ({ autoCloseTime = 4, id, message, leadingIcon, canManuallyClose, showCloseIcon, deleteSnack, }) => {
9
8
  useTimeout(() => deleteSnack(id), autoCloseTime * 1000);
10
9
  return (React.createElement(SnackItem, { p: "16px", key: id, mt: "16px", flex: true, justifyContent: "space-between" },
@@ -15,7 +14,7 @@ export const SnackbarItem = ({ autoCloseTime = 4, id, message, leadingIcon, canM
15
14
  };
16
15
  const SnackItem = styled(Box) `
17
16
  border-radius: 16px;
18
- background-color: ${theme.colors.liquorice};
17
+ background-color: ${({ theme }) => theme.color.surface.base[900]};
19
18
  `;
20
19
  const CloseButton = styled.button `
21
20
  cursor: pointer;
@@ -1 +1 @@
1
- {"version":3,"file":"SnackbarItem.js","sourceRoot":"","sources":["../../src/Snackbar/SnackbarItem.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAa,MAAM,OAAO,CAAA;AACjC,OAAO,MAAM,MAAM,mBAAmB,CAAA;AACtC,OAAO,EAAE,GAAG,EAAE,MAAM,QAAQ,CAAA;AAC5B,OAAO,EAAE,UAAU,EAAE,MAAM,UAAU,CAAA;AACrC,OAAO,EAAE,IAAI,EAAE,MAAM,SAAS,CAAA;AAC9B,OAAO,EAAE,IAAI,EAAE,MAAM,SAAS,CAAA;AAC9B,OAAO,EAAE,KAAK,EAAE,MAAM,UAAU,CAAA;AAOhC,MAAM,CAAC,MAAM,YAAY,GAAc,CAAC,EACtC,aAAa,GAAG,CAAC,EACjB,EAAE,EACF,OAAO,EACP,WAAW,EACX,gBAAgB,EAChB,aAAa,EACb,WAAW,GACZ,EAAE,EAAE;IACH,U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\nimport { useTimeout } from '../hooks'\nimport { Icon } from '../Icon'\nimport { Text } from '../Text'\nimport { theme } from '../theme'\nimport { Snackbar } from './types'\n\ninterface Props extends Snackbar {\n deleteSnack: (id: string) => void\n}\n\nexport const SnackbarItem: FC<Props> = ({\n autoCloseTime = 4,\n id,\n message,\n leadingIcon,\n canManuallyClose,\n showCloseIcon,\n deleteSnack,\n}) => {\n useTimeout(() => deleteSnack(id), autoCloseTime * 1000)\n\n return (\n <SnackItem p=\"16px\" key={id} mt=\"16px\" flex justifyContent=\"space-between\">\n <Box flex alignItems=\"center\">\n {leadingIcon && (\n <Icon mr=\"12px\" render={leadingIcon} size={24} color=\"mascarpone\" />\n )}\n <Text typo=\"body-small\" color=\"mascarpone\">\n {message}\n </Text>\n </Box>\n {canManuallyClose && (\n <CloseButton\n onClick={() => deleteSnack(id)}\n aria-label={`close snackbar ${message}`}\n >\n {showCloseIcon ? (\n <Icon render=\"cross\" size={16} color=\"mascarpone\" />\n ) : (\n <UnderlinedText tag=\"span\" typo=\"headline-small\" color=\"mascarpone\">\n Dismiss\n </UnderlinedText>\n )}\n </CloseButton>\n )}\n </SnackItem>\n )\n}\n\nconst SnackItem = styled(Box)`\n border-radius: 16px;\n background-color: ${theme.colors.liquorice};\n`\n\nconst CloseButton = styled.button`\n cursor: pointer;\n`\n\nconst UnderlinedText = styled(Text)`\n text-decoration: underline;\n`\n"]}
1
+ {"version":3,"file":"SnackbarItem.js","sourceRoot":"","sources":["../../src/Snackbar/SnackbarItem.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAa,MAAM,OAAO,CAAA;AACjC,OAAO,MAAM,MAAM,mBAAmB,CAAA;AACtC,OAAO,EAAE,GAAG,EAAE,MAAM,QAAQ,CAAA;AAC5B,OAAO,EAAE,UAAU,EAAE,MAAM,UAAU,CAAA;AACrC,OAAO,EAAE,IAAI,EAAE,MAAM,SAAS,CAAA;AAC9B,OAAO,EAAE,IAAI,EAAE,MAAM,SAAS,CAAA;AAO9B,MA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,IAAI,CAAC,GAAG,CAAC;CACjE,CAAA;AAED,MAAM,WAAW,GAAG,MAAM,CAAC,MAAM,CAAA;;CAEhC,CAAA;AAED,MAAM,cAAc,GAAG,MAAM,CAAC,IAAI,CAAC,CAAA;;CAElC,CAAA","sourcesContent":["import React, { FC } from 'react'\nimport styled from 'styled-components'\nimport { Box } from '../Box'\nimport { useTimeout } from '../hooks'\nimport { Icon } from '../Icon'\nimport { Text } from '../Text'\nimport { Snackbar } from './types'\n\ninterface Props extends Snackbar {\n deleteSnack: (id: string) => void\n}\n\nexport const SnackbarItem: FC<Props> = ({\n autoCloseTime = 4,\n id,\n message,\n leadingIcon,\n canManuallyClose,\n showCloseIcon,\n deleteSnack,\n}) => {\n useTimeout(() => deleteSnack(id), autoCloseTime * 1000)\n\n return (\n <SnackItem p=\"16px\" key={id} mt=\"16px\" flex justifyContent=\"space-between\">\n <Box flex alignItems=\"center\">\n {leadingIcon && (\n <Icon mr=\"12px\" render={leadingIcon} size={24} color=\"mascarpone\" />\n )}\n <Text typo=\"body-small\" color=\"mascarpone\">\n {message}\n </Text>\n </Box>\n {canManuallyClose && (\n <CloseButton\n onClick={() => deleteSnack(id)}\n aria-label={`close snackbar ${message}`}\n >\n {showCloseIcon ? (\n <Icon render=\"cross\" size={16} color=\"mascarpone\" />\n ) : (\n <UnderlinedText tag=\"span\" typo=\"headline-small\" color=\"mascarpone\">\n Dismiss\n </UnderlinedText>\n )}\n </CloseButton>\n )}\n </SnackItem>\n )\n}\n\nconst SnackItem = styled(Box)`\n border-radius: 16px;\n background-color: ${({ theme }) => theme.color.surface.base[900]};\n`\n\nconst CloseButton = styled.button`\n cursor: pointer;\n`\n\nconst UnderlinedText = styled(Text)`\n text-decoration: underline;\n`\n"]}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mrshmllw/smores-react",
3
- "version": "13.3.5",
3
+ "version": "13.3.6",
4
4
  "main": "./dist/index.js",
5
5
  "description": "Collection of React components used by Marshmallow Technology",
6
6
  "type": "module",