@flightlesslabs/dodo-ui 0.6.0 → 0.6.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.
@@ -30,3 +30,8 @@ const { Story } = defineMeta({
30
30
  <Story name="Default">
31
31
  <Paper>Hola!</Paper>
32
32
  </Story>
33
+
34
+ <!-- Paper with width and height -->
35
+ <Story name="WidthAndHeight">
36
+ <Paper width="200px" height="200px">Hola!</Paper>
37
+ </Story>
@@ -1,7 +1,7 @@
1
1
  <script lang="ts" module>export {};
2
2
  </script>
3
3
 
4
- <script lang="ts">let { children, roundness = '1x', shadow = '1x', id, class: className = '', _unsafeChildrenStringForTesting, ref = $bindable(), } = $props();
4
+ <script lang="ts">let { children, roundness = '1x', shadow = '1x', id, class: className = '', _unsafeChildrenStringForTesting, width, height, ref = $bindable(), } = $props();
5
5
  export {};
6
6
  </script>
7
7
 
@@ -14,6 +14,7 @@ export {};
14
14
  ].join(' ')}
15
15
  {id}
16
16
  bind:this={ref}
17
+ style={`${width ? `width:${width};` : ''}${height ? `height:${height};` : ''}`}
17
18
  >
18
19
  {#if children}
19
20
  {@render children()}
@@ -11,8 +11,12 @@ interface PaperProps {
11
11
  roundness?: PaperRoundness;
12
12
  /** Shadow elevation */
13
13
  shadow?: PaperShadow;
14
- /** Custom css class*/
14
+ /** Custom css class */
15
15
  class?: string;
16
+ /** Paper Width */
17
+ width?: string;
18
+ /** Paper Height */
19
+ height?: string;
16
20
  /** Id */
17
21
  id?: string;
18
22
  /** Test: ⚠️ Unsafe Children String. Do Not use*/
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@flightlesslabs/dodo-ui",
3
- "version": "0.6.0",
3
+ "version": "0.6.1",
4
4
  "scripts": {
5
5
  "build": "vite build && pnpm run prepack",
6
6
  "preview": "vite preview",
@@ -34,3 +34,8 @@
34
34
  <Story name="Default">
35
35
  <Paper>Hola!</Paper>
36
36
  </Story>
37
+
38
+ <!-- Paper with width and height -->
39
+ <Story name="WidthAndHeight">
40
+ <Paper width="200px" height="200px">Hola!</Paper>
41
+ </Story>
@@ -16,8 +16,12 @@
16
16
  roundness?: PaperRoundness;
17
17
  /** Shadow elevation */
18
18
  shadow?: PaperShadow;
19
- /** Custom css class*/
19
+ /** Custom css class */
20
20
  class?: string;
21
+ /** Paper Width */
22
+ width?: string;
23
+ /** Paper Height */
24
+ height?: string;
21
25
  /** Id */
22
26
  id?: string;
23
27
  /** Test: ⚠️ Unsafe Children String. Do Not use*/
@@ -31,6 +35,8 @@
31
35
  id,
32
36
  class: className = '',
33
37
  _unsafeChildrenStringForTesting,
38
+ width,
39
+ height,
34
40
  ref = $bindable<HTMLDivElement>(),
35
41
  }: PaperProps = $props();
36
42
  </script>
@@ -44,6 +50,7 @@
44
50
  ].join(' ')}
45
51
  {id}
46
52
  bind:this={ref}
53
+ style={`${width ? `width:${width};` : ''}${height ? `height:${height};` : ''}`}
47
54
  >
48
55
  {#if children}
49
56
  {@render children()}