@dhasdk/simple-ui 1.0.11 → 1.0.13

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/README.md CHANGED
@@ -98,10 +98,10 @@ Finally, if Accordion props are specified inside the parent component, those val
98
98
  | classNameHr | string | Yes | CSS classes applied to the HR that sits between the accordion heading and content body when open and the prop useBackground is true. |
99
99
  | hr | boolean | Yes | true | This boolean value when true directs the display an hr element between the Accordion heading and body when in the open state. |
100
100
  | ...props | string | No | | takes additional props that are not specifically defined in the component, i.e. aria-label |
101
- <!-- | rounded | boolean | Yes | false | This boolean value indicates whether to display rounded corners or not. By using this prop vs custom classes, only the top of the heading is rounded in an opened state, and only the bottom of the content block is rounded also. | -->
102
101
  | singleOpen | boolean | Yes | false | This boolean value directs the accordion to allow only one opened child content body at a time. Setting a value of false will allow multiple to be opened at once. |
103
102
  | useBackground | boolean | Yes | true | This boolean value causes the accordion content block to use the same background as the accordion heading. When true, an hr is also present at the top of the content block to separate the heading from the content. This hr can be styled separately using the classNameHr prop. |
104
- | variant | string | Yes | 'default' | currently unused |
103
+
104
+
105
105
 
106
106
  ### Props for Accordion
107
107
 
@@ -360,10 +360,15 @@ A reference can also be created and passed to the button component, and the comp
360
360
  | ----------- | -------- | -------- | -------- | ----------- |
361
361
  | children | ReactNode | Yes | | Content to display in the Button, overrides 'label' if both are present. |
362
362
  | className | string | Yes | **(1) below** | Class names to style component |
363
+ | classNameIconLeft | string | Yes | **`mr-3`** | Class names to style the span element that contains the left icon |
364
+ | classNameIconRight | string | Yes | **`ml-3`** | Class names to style the span element that contains the right icon |
365
+ | classNameContent | string | Yes | **`grow-1 text-start`** | Class names to style the content block / body, i.e. the label |
363
366
  | classNameSelected | string | Yes | undefined | Class names to apply to the components if they are in the optional selected state, see **selected** below |
364
367
  | icon | ReactNode | Yes | undefined | image, icon, etc. to use for left or right icon as defined by **`iconPosition`** |
365
- | iconPosition | 'left', 'right', 'iconOnly', undefined | Yes | | indicates the location for icon if specified |
366
- | label | string | Yes | | Display text for button. If 'children' is present, that is used instead |
368
+ | iconLeft | ReactNode | Yes | undefined | This contains the optional icon to display on the left side of the button. This prop does not require the use of the iconPosition prop below. |
369
+ | iconRight | ReactNode | Yes | undefined | This contains the optional icon to display on the right side of the button. This prop does not require the use of the iconPosition prop below. |
370
+ | iconPosition | 'left', 'right', 'both', 'iconOnly', undefined | Yes | undefined | Controls where the icon is positioned on the Button. Alternatively, iconLeft and iconRightcan be used above. |
371
+ | label | string | Yes | | Display text for button. If **'children'** is present, that is used instead |
367
372
  | onClick | () => void | Yes | | A click handler for the Button |
368
373
  | ...props | string | Yes | undefined | additional props that are not specifically defined in the component, i.e. aria-label |
369
374
  | type | string | Yes | 'button' | specifies the button type, and is one of 'button', 'submit', or 'reset' |
@@ -434,6 +439,18 @@ using selected option w/ filled variant
434
439
  />
435
440
  ```
436
441
 
442
+ two icons w/ custom css
443
+ ```jsx
444
+ <Button
445
+ className='justify-between w-[400px] px-3'
446
+ onClick={handleClick}
447
+ label='Two Icons w/ CSS'
448
+ disabled={disabled}
449
+ iconLeft={<img src={calendar} alt='calendar' className='size-[36px]' />}
450
+ iconRight={<img src={chevronRight} alt='chevron' />}
451
+ />
452
+ ```
453
+
437
454
 
438
455
  ### Dependencies
439
456