Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(Logo): Refactor Logo to ts #3611

Merged
merged 9 commits into from
Jun 6, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ For more information on how to replace these, check out [these docs](/uilib/layo

## Tag

- Find prop `onDelete` and replace with `onClick`, add prop `variant='removable'`
- Find prop `onDelete` and replace with `onClick`, add prop `variant='removable'`.

## Definition lists

Expand All @@ -80,12 +80,12 @@ The `InputPassword` component has been moved to `Field.Password`, and is now a p

## ProgressIndicator

- replace `no_animation` with `noAnimation`
- replace `label_direction` with `labelDirection`
- replace `show_label` with `showDefaultLabel`
- replace `on_complete` with `onComplete`
- replace `class` with `className`
- replace `children` with `label`
- replace `no_animation` with `noAnimation`.
- replace `label_direction` with `labelDirection`.
- replace `show_label` with `showDefaultLabel`.
- replace `on_complete` with `onComplete`.
- replace `class` with `className`.
- replace `children` with `label`.

## Hr-line (Divider)

Expand All @@ -98,11 +98,19 @@ The `InputPassword` component has been moved to `Field.Password`, and is now a p

## Checkbox

- replace `label_position` with `labelPosition`
- replace `label_sr_only` with `labelSrOnly`
- replace `status_state` with `statusState`
- replace `status_props` with `statusProps`
- replace `on_change` with `onChange`
- replace `children` with `label`
- replace `label_position` with `labelPosition`.
- replace `label_sr_only` with `labelSrOnly`.
- replace `status_state` with `statusState`.
- replace `status_props` with `statusProps`.
- replace `on_change` with `onChange`.
- replace `children` with `label`.

## Logo

- remove `size`. replace it with `height` if it contains a numeric value and with `inheritSize` where `size='inherit'`.
- remove the following props: `alt` and `ratio`.
- replace `inherit_color` with `inheritColor`.
- change `width` from number to string.
- change `height`from number to string.

_February, 6. 2024_
Original file line number Diff line number Diff line change
Expand Up @@ -16,23 +16,23 @@ export const LogoDefaultExample = () => (
export const LogoAutoSizeExample = () => (
<ComponentBox data-visual-test="logo-auto-size">
<span style={{ fontSize: '6rem' }}>
<Logo size="auto" />
<Logo />
</span>
</ComponentBox>
)

export const LogoInheritSizeExample = () => (
<ComponentBox data-visual-test="logo-inherit-size">
<span style={{ height: '6rem' }}>
<Logo size="inherit" />
<Logo inheritSize />
</span>
</ComponentBox>
)

export const LogoInheritColorExample = () => (
<ComponentBox data-visual-test="logo-inherit-color">
<span style={{ color: 'tomato' }}>
<Logo height="96" inherit_color />
<Logo height="96" inheritColor />
</span>
</ComponentBox>
)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,15 +2,7 @@
showTabs: true
---

## Properties
import PropertiesTable from 'dnb-design-system-portal/src/shared/parts/PropertiesTable'
import { LogoProperties } from '@dnb/eufemia/src/components/logo/LogoDocs'

| Properties | Description |
| --------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `brand` | _(optional)_ define which brand's logo to show. `ui` (DNB) or `sbanken`. Defaults to `ui`. |
| `variant` | _(optional)_ define the logo variant, if there is more than one variant of a brand's logo. Currently the only option other than default is a `compact` variant of the Sbanken logo. Defaults to `default`. |
| `size` | _(optional)_ define the size of the logo. Sets the height. The width will be calculated by the ratio. Also, `inherit` will use the inherited height. Defaults to `auto`. |
| `color` | _(optional)_ define the color of the logo. |
| `inherit_color` | _(optional)_ set to `true` if you do not want to inherit the color by `currentColor`. Defaults to `false`. |
| `width` | _(optional)_ define either the width of the logo. |
| `height` | _(optional)_ or define the height of the logo. |
| [Space](/uilib/layout/space/properties) | _(optional)_ spacing properties like `top` or `bottom` are supported. |
<PropertiesTable props={LogoProperties} />
47 changes: 0 additions & 47 deletions packages/dnb-eufemia/src/components/logo/Logo.d.ts

This file was deleted.

Loading
Loading