Skip to content

Commit

Permalink
Merge pull request #727 from Sysvale/feature/box-overflow
Browse files Browse the repository at this point in the history
feat: implementa prop que controla overflow do componente Box
  • Loading branch information
rodrigo-barboza authored Sep 27, 2024
2 parents 6ddcd61 + f2b1503 commit 67cf1eb
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 2 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@sysvale/cuida",
"version": "3.58.0",
"version": "3.59.0",
"description": "A design system built by Sysvale, using storybook and Vue components",
"repository": {
"type": "git",
Expand Down
13 changes: 12 additions & 1 deletion src/components/Box.vue
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,13 @@ export default {
type: String,
default: 'gray',
},
/**
* Quando true, oculta o overflow do componente.
*/
overflowVisible: {
type: Boolean,
default: false
}
},

data() {
Expand All @@ -89,6 +96,10 @@ export default {
borderRadiusResolver() {
return this.rounder(this.width, 12);
},

overflowResolver() {
return this.overflowVisible ? 'visible' : 'hidden';
},
},

mounted() {
Expand All @@ -113,7 +124,7 @@ export default {
.box {
width: v-bind(widthResolver);
border-radius: v-bind(borderRadiusResolver);
overflow: hidden;
overflow: v-bind(overflowResolver);

&__container {
width: v-bind(widthResolver);
Expand Down
1 change: 1 addition & 0 deletions src/stories/components/Box.stories.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,7 @@ export const Template = (args) => ({
fluid: false,
elevated: false,
variant: 'gray',
overflowVisible: false,
}}
>
{ Template.bind({}) }
Expand Down

0 comments on commit 67cf1eb

Please sign in to comment.