(react) add responsive helper

This helper provides handy functions to make components responsive.
This commit is contained in:
Nathan Vasse
2023-12-08 12:14:20 +01:00
committed by NathanVss
parent 7b0686dede
commit 6dcafa91f4

View File

@@ -0,0 +1,13 @@
@use "sass:map";
@use "../cunningham-tokens" as *;
@function breakpoint($name, $tokens: $themes) {
@return map.get($tokens, 'default', 'theme', 'breakpoints', $name);
}
@mixin container($name, $tokens: $themes) {
$breakpoint: breakpoint($name, $tokens);
@container (max-width: #{$breakpoint}) {
@content;
}
}