kedhar-ui 0.2.0 → 0.2.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +1 -1
- package/src/components/Card.astro +19 -3
package/package.json
CHANGED
|
@@ -9,11 +9,18 @@
|
|
|
9
9
|
* <p>Content here...</p>
|
|
10
10
|
* </Card>
|
|
11
11
|
*
|
|
12
|
+
* <!-- As a link -->
|
|
13
|
+
* <Card hover ripple tag="a" href="/projects/my-project/">
|
|
14
|
+
* ...
|
|
15
|
+
* </Card>
|
|
16
|
+
*
|
|
12
17
|
* Props:
|
|
13
18
|
* hover — Enable lift-on-hover effect (default: false)
|
|
14
19
|
* ripple — Enable CSS ripple effect (default: false)
|
|
15
|
-
* tag — HTML tag to use (default: 'div', can be 'article', 'section', 'a')
|
|
20
|
+
* tag — HTML tag to use (default: 'div', can be 'div', 'article', 'section', 'a')
|
|
16
21
|
* class — Additional CSS classes
|
|
22
|
+
*
|
|
23
|
+
* All other attributes (href, target, rel, etc.) are forwarded to the root element.
|
|
17
24
|
*/
|
|
18
25
|
|
|
19
26
|
export interface Props {
|
|
@@ -23,9 +30,18 @@ export interface Props {
|
|
|
23
30
|
class?: string;
|
|
24
31
|
}
|
|
25
32
|
|
|
26
|
-
const {
|
|
33
|
+
const {
|
|
34
|
+
hover = false,
|
|
35
|
+
ripple = false,
|
|
36
|
+
tag: Tag = 'div',
|
|
37
|
+
class: className,
|
|
38
|
+
...rest
|
|
39
|
+
} = Astro.props;
|
|
27
40
|
---
|
|
28
41
|
|
|
29
|
-
<Tag
|
|
42
|
+
<Tag
|
|
43
|
+
class:list={['ks-card', { 'ks-card-hover': hover, 'ks-ripple': ripple }, className]}
|
|
44
|
+
{...rest}
|
|
45
|
+
>
|
|
30
46
|
<slot />
|
|
31
47
|
</Tag>
|