@@ -69,7 +69,7 @@ description: Take picture from user's camera
69
69
<p-card
70
70
title="Any Title Should Here">
71
71
<template #action>
72
- <p-button color =" info " variant =" link " >Button Text</p-button >
72
+ <p-button color =" info " variant =" link " style = " --p-button-md-padding-y : 0 ; --p-button-md-padding-x : 0 ; " >Button Text</p-button >
73
73
</template >
74
74
While here you will see the content of cards, everything goes here.
75
75
If you need custom cards, take the component which more represent to
@@ -151,7 +151,7 @@ description: Take picture from user's camera
151
151
title="Card with Sub-Section"
152
152
sectioned>
153
153
<template #action>
154
- <p-button variant =" link " color =" info " >Button Text</p-button >
154
+ <p-button variant =" link " color =" info " style = " --p-button-md-padding-y : 0 ; --p-button-md-padding-x : 0 ; " >Button Text</p-button >
155
155
</template >
156
156
<p-card-section >
157
157
While here you will see the content of cards, everything goes here.
@@ -266,12 +266,67 @@ description: Take picture from user's camera
266
266
</template>
267
267
```
268
268
269
+ ## Spacing
270
+ Card component features 4 distinct spacing variants that adjust the size and
271
+ layout of the content within the card body. Each variant is designed to offer
272
+ flexibility in presentation and to suit different design needs.
273
+ There are ` sm ` , ` md ` , ` lg ` and ` xl ` . Default spacing are ` md ` .
274
+ The spacing feature also work in ` Sectioned card ` .
275
+
276
+ <preview >
277
+ <p-card spacing =" sm " >
278
+ While here you will see the content of cards, everything goes here.
279
+ If you need custom cards, take the component which more represent to
280
+ what you need and detach it.
281
+ </p-card >
282
+ <p-card spacing =" md " >
283
+ While here you will see the content of cards, everything goes here.
284
+ If you need custom cards, take the component which more represent to
285
+ what you need and detach it.
286
+ </p-card >
287
+ <p-card spacing =" lg " >
288
+ While here you will see the content of cards, everything goes here.
289
+ If you need custom cards, take the component which more represent to
290
+ what you need and detach it.
291
+ </p-card >
292
+ <p-card spacing =" xl " >
293
+ While here you will see the content of cards, everything goes here.
294
+ If you need custom cards, take the component which more represent to
295
+ what you need and detach it.
296
+ </p-card >
297
+ </preview >
298
+
299
+ ``` vue
300
+ <template>
301
+ <p-card spacing="sm">
302
+ While here you will see the content of cards, everything goes here.
303
+ If you need custom cards, take the component which more represent to
304
+ what you need and detach it.
305
+ </p-card>
306
+ <p-card spacing="md">
307
+ While here you will see the content of cards, everything goes here.
308
+ If you need custom cards, take the component which more represent to
309
+ what you need and detach it.
310
+ </p-card>
311
+ <p-card spacing="lg">
312
+ While here you will see the content of cards, everything goes here.
313
+ If you need custom cards, take the component which more represent to
314
+ what you need and detach it.
315
+ </p-card>
316
+ <p-card spacing="xl">
317
+ While here you will see the content of cards, everything goes here.
318
+ If you need custom cards, take the component which more represent to
319
+ what you need and detach it.
320
+ </p-card>
321
+ </template>
322
+ ```
323
+
269
324
## Variables
270
325
Card use local CSS variables on ` .card ` for enhanced real-time customization.
271
326
272
327
``` sass
273
- --p-card-padding-x : theme(spacing.6 );
274
- --p-card-padding-y : theme(spacing.6 );
328
+ --p-card-border-radius : theme(borderRadius.md );
329
+ --p-card-inside-border-radius : theme(borderRadius.DEFAULT );
275
330
--p-card-bg: theme(backgroundColor.default.DEFAULT);
276
331
--p-card-bg-dark: theme(backgroundColor.dark.default.DEFAULT);
277
332
--p-card-border: theme(borderColor.default.DEFAULT);
@@ -286,12 +341,13 @@ Card use local CSS variables on `.card` for enhanced real-time customization.
286
341
287
342
| Props | Type | Default | Description |
288
343
| ---------------| :---------:| :---------:| --------------------------------------------------------------|
289
- | ` element ` | ` String ` | ` section ` | Card element, valid value is ` div ` , ` section ` , and ` article ` |
344
+ | ` element ` | ` String ` | ` section ` | Card element, valid value are ` div ` , ` section ` and ` article ` |
290
345
| ` title ` | ` String ` | - | Card Header Title |
291
346
| ` sectioned ` | ` Boolean ` | ` false ` | Enable Card Section |
292
347
| ` disabled ` | ` Boolean ` | ` false ` | Disable (look-like) Card |
293
348
| ` callout ` | ` Boolean ` | ` false ` | Enable Callout |
294
349
| ` dismissable ` | ` Boolean ` | ` true ` | Show / Hide dismiss button |
350
+ | ` spacing ` | ` String ` | ` md ` | Card spacing, valid value are ` sm ` , ` md ` , ` lg ` and ` xl ` |
295
351
296
352
### Slots
297
353
| Name | Description |
0 commit comments