Skip to content

Commit

Permalink
feat(VFab): add new layout prop that determines if app fab takes up s…
Browse files Browse the repository at this point in the history
…pace
  • Loading branch information
johnleider committed Apr 21, 2024
1 parent c74d0c9 commit 0d0759c
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
1 change: 1 addition & 0 deletions packages/api-generator/src/locale/en/VFab.json
@@ -1,6 +1,7 @@
{
"props": {
"app": "If true, attaches to the closest layout and positions according to the value of **location**.",
"layout": "If true, will effect layout dimensions based on size and position.",
"appear": "Used to control the animation of the FAB.",
"extended": "An alternate style for the FAB that expects text.",
"location": "The location of the fab relative to the layout. Only works when using **app**.",
Expand Down
5 changes: 3 additions & 2 deletions packages/vuetify/src/labs/VFab/VFab.tsx
Expand Up @@ -25,6 +25,7 @@ export const makeVFabProps = propsFactory({
app: Boolean,
appear: Boolean,
extended: Boolean,
layout: Boolean,
location: {
type: String as PropType<typeof locations[number]>,
default: 'bottom end',
Expand Down Expand Up @@ -78,8 +79,8 @@ export const VFab = genericComponent()({
id: props.name,
order: computed(() => parseInt(props.order, 10)),
position,
layoutSize: height,
elementSize: computed(() => height.value + 32),
layoutSize: computed(() => props.layout ? height.value + 24 : 0),
elementSize: computed(() => height.value),
active: computed(() => props.app && model.value),
absolute: toRef(props, 'absolute'),
})
Expand Down

0 comments on commit 0d0759c

Please sign in to comment.