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