(size: 'default' | 'sm' = 'default')
| 239 | // This generates the border radius for t-shirt sizes using the |
| 240 | // Major Second logarithmic scale. |
| 241 | export const controlBorderRadius = (size: 'default' | 'sm' = 'default') => |
| 242 | ({ |
| 243 | '--size': { |
| 244 | type: 'order', |
| 245 | value: { |
| 246 | default: 1, |
| 247 | size: { |
| 248 | XS: Math.pow(1.125, -2), |
| 249 | S: Math.pow(1.125, -1), |
| 250 | L: Math.pow(1.125, 1), |
| 251 | XL: Math.pow(1.125, 2) |
| 252 | } |
| 253 | } |
| 254 | }, |
| 255 | '--radius': { |
| 256 | type: 'borderTopStartRadius', |
| 257 | value: size |
| 258 | }, |
| 259 | borderRadius: 'round(var(--radius) * var(--size), 1px)' |
| 260 | }) as const; |
| 261 | |
| 262 | interface ControlOptions { |
| 263 | shape?: 'default' | 'pill'; |
no outgoing calls
no test coverage detected