UNPKG

@mantine/core

Version:

React components library focused on usability, accessibility and developer experience

1 lines 838 B
{"version":3,"file":"radius-resolver.cjs","names":["rem"],"sources":["../../../../../../src/core/Box/style-props/resolvers/radius-resolver/radius-resolver.ts"],"sourcesContent":["import { MantineTheme } from '../../../../MantineProvider';\nimport { rem } from '../../../../utils';\n\nexport function radiusResolver(value: unknown, theme: MantineTheme) {\n if (typeof value === 'string' && value in theme.radius) {\n return `var(--mantine-radius-${value})`;\n }\n\n if (typeof value === 'number') {\n return rem(value);\n }\n\n if (typeof value === 'string') {\n return rem(value);\n }\n\n return value;\n}\n"],"mappings":";;;AAGA,SAAgB,eAAe,OAAgB,OAAqB;AAClE,KAAI,OAAO,UAAU,YAAY,SAAS,MAAM,OAC9C,QAAO,wBAAwB,MAAM;AAGvC,KAAI,OAAO,UAAU,SACnB,QAAOA,YAAAA,IAAI,MAAM;AAGnB,KAAI,OAAO,UAAU,SACnB,QAAOA,YAAAA,IAAI,MAAM;AAGnB,QAAO"}