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

Update docs #239

Merged
merged 2 commits into from
Mar 26, 2024
Merged

Update docs #239

merged 2 commits into from
Mar 26, 2024

Conversation

GarthDB
Copy link
Member

@GarthDB GarthDB commented Mar 25, 2024

Description

There were some broken examples in the "Leonardo JS API" page.

Motivation

Previously, this was the example code on the site has this code which doesn't work:

const red = new Color({...})
// Change the colors ratios
theme.updateColor = {name: 'red', ratios: [3, 4.5, 7]};

// Change the colors colorKeys
theme.updateColor = {name: 'red', colorKeys: ['#ff0000']};

// Change the color's name
theme.updateColor = {name: 'red', name: 'Crimson'};

I changed it to this:

// Change the colors ratios
theme.updateColor = {color: 'red', ratios: [3, 4.5, 7]};

// Change the colors colorKeys
theme.updateColor = {color: 'red', colorKeys: ['#ff0000']};

// Change the color's name
theme.updateColor = {color: 'red', name: 'Crimson'};

I also added this, (which helps #229 ).

// It's also possible to change the color name and colorKeys in the same function
theme.updateColor = {color: 'red', ratios: [3, 4.5, 7], colorKeys: ['#ff0000'], name: 'Crimson'};

To-do list

  • This pull request is ready to merge.

Copy link

changeset-bot bot commented Mar 25, 2024

⚠️ No Changeset found

Latest commit: 0de1e18

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

@GarthDB
Copy link
Member Author

GarthDB commented Mar 25, 2024

Run report for 0de1e185

Total time: 19.1s | Comparison time: 17.7s | Estimated loss: 1.3s (7.0% slower)

Action Time Status Info
🟩 SyncWorkspace 0ms Passed
⬛️ SetupNodeTool(~20.11) 1.2s Skipped
🟩 InstallNodeDeps(~20.11) 8.4s Passed
🟩 SyncNodeProject(contrast-colors) 0.2ms Passed
🟩 SyncNodeProject(ui) 0.3ms Passed
🟩 RunTask(ui:makeDistDir) 32.3ms Passed
🟩 RunTask(ui:copyCNAME) 55.7ms Passed
🟩 RunTask(ui:copyUIIcons) 55.7ms Passed
🟩 RunTask(ui:copyWorkflowIcons) 39.5ms Passed
🟩 RunTask(ui:buildSite) 9.4s Passed
Touched files
.changeset/config.json
docs/ui/src/views/home_gettingStarted.html

@GarthDB GarthDB requested a review from karstens March 25, 2024 19:53
@GarthDB GarthDB merged commit ac2237b into main Mar 26, 2024
3 checks passed
@GarthDB GarthDB deleted the garthdb/229-docs-update branch March 26, 2024 18:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant