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(table): add cell type "Indicator" #573

Merged
merged 1 commit into from
Jan 22, 2025
Merged

Conversation

kiaking
Copy link
Member

@kiaking kiaking commented Jan 22, 2025

Adds cell type that uses <SIndicator>. This PR also adds a new state "Aborted" to the <SIndicator>.

const data = [
  { progress: { state: 'completed', label: 'Completed' } },
  { progress: { state: 'running', label: 'In Progress' } },
  { progress: { state: 'aboretd', label: 'Aborted' } }
]

const table = useTable({
  records: data,
  orders: ['progress'],
  columns: {
    progress: {
      label: 'Progress',
      cell: (_, record) => ({
        type: 'indicator',
        state: record.progress.state,
        label: record.progress.label
      })
    }
  }
})

Screenshot 2025-01-22 at 14 21 25

@kiaking kiaking self-assigned this Jan 22, 2025
@kiaking kiaking requested a review from brc-dd as a code owner January 22, 2025 05:24
Copy link

netlify bot commented Jan 22, 2025

Deploy Preview for sefirot-story ready!

Name Link
🔨 Latest commit 934e042
🔍 Latest deploy log https://app.netlify.com/sites/sefirot-story/deploys/67908107d8769e0008d2b06a
😎 Deploy Preview https://deploy-preview-573--sefirot-story.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

Copy link

netlify bot commented Jan 22, 2025

Deploy Preview for sefirot-docs ready!

Name Link
🔨 Latest commit 934e042
🔍 Latest deploy log https://app.netlify.com/sites/sefirot-docs/deploys/6790810738d3ec0008dc7aa9
😎 Deploy Preview https://deploy-preview-573--sefirot-docs.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

@kiaking kiaking merged commit 20d82bc into main Jan 22, 2025
9 checks passed
@kiaking kiaking deleted the table-indicator-cell branch January 22, 2025 05:33
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.

2 participants