Skip to content

Commit

Permalink
docs(flex): switch examples to plain markup (#14559)
Browse files Browse the repository at this point in the history
  • Loading branch information
KareemDa authored Jun 15, 2022
1 parent 8b4e0e7 commit e60e5a9
Show file tree
Hide file tree
Showing 4 changed files with 112 additions and 125 deletions.
114 changes: 81 additions & 33 deletions packages/docs/src/examples/flex/flex-align-self.vue
Original file line number Diff line number Diff line change
@@ -1,39 +1,87 @@
<template>
<div>
<v-card
v-for="j in justify"
:key="j"
class="d-flex mb-6"
color="grey lighten-2"
flat
height="100"
tile
>
<v-card
v-for="n in 3"
:key="n"
class="pa-2"
:class="[n === 2 && `align-self-${j}`]"
outlined
tile
>
{{ n === 2 ? 'Aligned flex item' : 'Flex item' }}
<v-card class="d-flex mb-6" color="grey lighten-2" flat height="100" tile>
<v-card class="pa-2" outlined tile>
flex item
</v-card>

<v-card class="pa-2 align-self-start" outlined tile>
Aligned start
</v-card>

<v-card class="pa-2" outlined tile>
flex item
</v-card>
</v-card>

<v-card class="d-flex mb-6" color="grey lighten-2" flat height="100" tile>
<v-card class="pa-2" outlined tile>
flex item
</v-card>

<v-card class="pa-2 align-self-center" outlined tile>
Aligned center
</v-card>

<v-card class="pa-2" outlined tile>
flex item
</v-card>
</v-card>

<v-card class="d-flex mb-6" color="grey lighten-2" flat height="100" tile>
<v-card class="pa-2" outlined tile>
flex item
</v-card>

<v-card class="pa-2 align-self-end" outlined tile>
Aligned end
</v-card>

<v-card class="pa-2" outlined tile>
flex item
</v-card>
</v-card>

<v-card class="d-flex mb-6" color="grey lighten-2" flat height="100" tile>
<v-card class="pa-2" outlined tile>
flex item
</v-card>

<v-card class="pa-2 align-self-baseline" outlined tile>
Aligned baseline
</v-card>

<v-card class="pa-2" outlined tile>
flex item
</v-card>
</v-card>

<v-card class="d-flex mb-6" color="grey lighten-2" flat height="100" tile>
<v-card class="pa-2" outlined tile>
flex item
</v-card>

<v-card class="pa-2 align-self-auto" outlined tile>
Aligned auto
</v-card>

<v-card class="pa-2" outlined tile>
flex item
</v-card>
</v-card>

<v-card class="d-flex mb-6" color="grey lighten-2" flat height="100" tile>
<v-card class="pa-2" outlined tile>
flex item
</v-card>

<v-card class="pa-2 align-self-stretch" outlined tile>
Aligned stretch
</v-card>

<v-card class="pa-2" outlined tile>
flex item
</v-card>
</v-card>
</div>
</template>

<script>
export default {
data: () => ({
justify: [
'start',
'end',
'center',
'baseline',
'auto',
'stretch',
],
}),
}
</script>
33 changes: 6 additions & 27 deletions packages/docs/src/examples/flex/flex-order.vue
Original file line number Diff line number Diff line change
@@ -1,32 +1,11 @@
<template>
<div>
<v-card
class="d-flex flex-wrap-reverse"
color="grey lighten-2"
flat
tile
>
<v-card
class="order-3 pa-2"
outlined
tile
>
First flex item
</v-card>
<v-card
class="order-2 pa-2"
outlined
tile
>
Second flex item
</v-card>
<v-card
class="order-1 pa-2"
outlined
tile
>
Third flex item
</v-card>
<v-card class="d-flex flex-wrap-reverse" color="grey lighten-2" flat tile>
<v-card class="order-3 pa-2" outlined tile> First flex item </v-card>

<v-card class="order-2 pa-2" outlined tile> Second flex item </v-card>

<v-card class="order-1 pa-2" outlined tile> Third flex item </v-card>
</v-card>
</div>
</template>
31 changes: 11 additions & 20 deletions packages/docs/src/examples/flex/margins-align-items.vue
Original file line number Diff line number Diff line change
Expand Up @@ -7,34 +7,25 @@
tile
height="200"
>
<v-card
v-for="n in 3"
:key="n"
:class="n === 1 && 'mb-auto'"
class="pa-2"
outlined
tile
>
Flex item
</v-card>
<v-card class="pa-2 mb-auto" outlined tile> Flex item </v-card>

<v-card class="pa-2" outlined tile> Flex item </v-card>

<v-card class="pa-2" outlined tile> Flex item </v-card>
</v-card>

<v-card
class="d-flex align-end flex-column"
color="grey lighten-2"
flat
tile
height="200"
>
<v-card
v-for="n in 3"
:key="n"
:class="n === 3 && 'mt-auto'"
class="pa-2"
outlined
tile
>
Flex item
</v-card>
<v-card class="pa-2" outlined tile> Flex item </v-card>

<v-card class="pa-2" outlined tile> Flex item </v-card>

<v-card class="pa-2 mt-auto" outlined tile> Flex item </v-card>
</v-card>
</div>
</template>
59 changes: 14 additions & 45 deletions packages/docs/src/examples/flex/margins.vue
Original file line number Diff line number Diff line change
@@ -1,56 +1,25 @@
<template>
<div>
<v-card
class="d-flex mb-6"
color="grey lighten-2"
flat
tile
>
<v-card
v-for="n in 3"
:key="n"
class="pa-2"
outlined
tile
>
<v-card class="d-flex mb-6" color="grey lighten-2" flat tile>
<v-card v-for="n in 3" :key="n" class="pa-2" outlined tile>
Flex item
</v-card>
</v-card>

<v-card
class="d-flex mb-6"
color="grey lighten-2"
flat
tile
>
<v-card
v-for="n in 3"
:key="n"
:class="n === 1 && 'mr-auto'"
class="pa-2"
outlined
tile
>
Flex item
</v-card>
<v-card class="d-flex mb-6" color="grey lighten-2" flat tile>
<v-card class="pa-2 mr-auto" outlined tile> Flex item </v-card>

<v-card class="pa-2" outlined tile> Flex item </v-card>

<v-card class="pa-2" outlined tile> Flex item </v-card>
</v-card>

<v-card
class="d-flex mb-6"
color="grey lighten-2"
flat
tile
>
<v-card
v-for="n in 3"
:key="n"
:class="n === 3 && 'ml-auto'"
class="pa-2"
outlined
tile
>
Flex item
</v-card>
<v-card class="d-flex" color="grey lighten-2" flat tile>
<v-card class="pa-2" outlined tile> Flex item </v-card>

<v-card class="pa-2" outlined tile> Flex item </v-card>

<v-card class="pa-2 ml-auto" outlined tile> Flex item </v-card>
</v-card>
</div>
</template>

0 comments on commit e60e5a9

Please sign in to comment.