Skip to content
Snippets Groups Projects
readme.md 1.54 KiB
Newer Older
  • Learn to ignore specific revisions
  • ---
    id: button
    title: Button
    sidebar_label: Button
    ---
    
    Actually this is a button for Helsinki University new design system. It looks like this:
    
    <hy-button>Click me!</hy-button>
    
    ```
    <hy-button>Click me!</hy-button>
    ```
    
    ## Use any custom html
    
    <hy-button onclick="window.alert('whaat')" >Try to click me now!</hy-button>
    
    ```
    <hy-button onclick="window.alert('whaat')">Click me!</hy-button>
    ```
    
    ## Docusaurus can even do this:
    
    ```html live
    <hy-button onclick="window.alert('whoa')">Try to live edit me</hy-button>
    ```
    
    <!-- Auto Generated Below -->
    
    
    ## Properties
    
    | Property    | Attribute    | Description | Type                                                                           | Default                  |
    | ----------- | ------------ | ----------- | ------------------------------------------------------------------------------ | ------------------------ |
    | `icon`      | `icon`       |             | `string`                                                                       | `undefined`              |
    | `iconRight` | `icon-right` |             | `string`                                                                       | `undefined`              |
    | `variant`   | `variant`    |             | `ButtonVariants.default \| ButtonVariants.outline \| ButtonVariants.secondary` | `ButtonVariants.default` |
    
    
    ## Dependencies
    
    ### Depends on
    
    - [hy-icon](../icon)
    
    ### Graph
    ```mermaid
    graph TD;
      hy-button --> hy-icon
      style hy-button fill:#f9f,stroke:#333,stroke-width:4px
    ```
    
    ----------------------------------------------
    
    HY component demo