Skip to content

Commit

Permalink
feature: add large breakpoint
Browse files Browse the repository at this point in the history
  • Loading branch information
lorant-one committed Jan 10, 2025
1 parent 63ac6c5 commit 9b3ac77
Show file tree
Hide file tree
Showing 3 changed files with 33 additions and 3 deletions.
2 changes: 1 addition & 1 deletion src/once-ui/components/Flex.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -302,4 +302,4 @@ const Flex = forwardRef<HTMLDivElement, ComponentProps>(
);

Flex.displayName = "Flex";
export { Flex };
export { Flex };
4 changes: 2 additions & 2 deletions src/once-ui/interfaces.ts
Original file line number Diff line number Diff line change
Expand Up @@ -133,8 +133,8 @@ export interface StyleProps extends HTMLAttributes<HTMLDivElement> {
}

export interface ConditionalProps extends HTMLAttributes<HTMLDivElement> {
hide?: "s" | "m";
show?: "s" | "m";
hide?: "s" | "m" | "l";
show?: "s" | "m" | "l";
}

export interface DisplayProps extends HTMLAttributes<HTMLDivElement> {
Expand Down
30 changes: 30 additions & 0 deletions src/once-ui/styles/layout.scss
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,10 @@
flex-direction: row-reverse;
}

.l-flex-show {
display: none;
}

.m-flex-show {
display: none;
}
Expand All @@ -34,6 +38,32 @@
display: none;
}

@media (--l) {
.l-flex-hide {
display: none !important;
}

.l-flex-show {
display: flex !important;
}

.l-flex-column {
flex-direction: column !important;
}

.l-flex-row {
flex-direction: row !important;
}

.l-flex-column-reverse {
flex-direction: column-reverse !important;
}

.l-flex-row-reverse {
flex-direction: row-reverse !important;
}
}

@media (--m) {
.m-flex-hide {
display: none !important;
Expand Down

0 comments on commit 9b3ac77

Please sign in to comment.