Skip to content

Commit

Permalink
Merge pull request #77 from components-ai/properties-progress
Browse files Browse the repository at this point in the history
Add a progress bar to unsupported page
  • Loading branch information
johno authored Apr 30, 2022
2 parents ca75240 + 9a6b880 commit f3b3d68
Show file tree
Hide file tree
Showing 3 changed files with 29 additions and 1 deletion.
5 changes: 5 additions & 0 deletions .changeset/friendly-apes-carry.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'@compai/css-gui': patch
---

Add all properties export
24 changes: 23 additions & 1 deletion apps/docs/pages/unsupported.tsx
Original file line number Diff line number Diff line change
@@ -1,13 +1,35 @@
import { unsupportedProperties } from '@compai/css-gui'
import { allProperties, unsupportedProperties } from '@compai/css-gui'

export default function UnsupportedProperties() {
const allPropertiesCount = allProperties.length
const unsupportedPropertiesCount = unsupportedProperties.length
const implementedPropertiesCount =
allPropertiesCount - unsupportedPropertiesCount
const percentageComplete = Math.round(
(implementedPropertiesCount / allPropertiesCount) * 100
)

return (
<div>
<h1>Unsupported properties</h1>
<p>
CSS GUI is a work in progress, below is an up to date listing of
properties that haven&apos;t been implemented yet.
</p>
<label htmlFor="progress" sx={{ fontWeight: 500 }}>
So far, we've implemented {implementedPropertiesCount} out of{' '}
{allPropertiesCount} properties ({percentageComplete}%).
<br />
<progress
id="progress"
max="100"
value={percentageComplete}
sx={{ width: '100%' }}
>
{percentageComplete}%
</progress>
</label>

<ul>
{unsupportedProperties.map(({ property, url }) => {
return (
Expand Down
1 change: 1 addition & 0 deletions packages/gui/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ export { Layout } from './components/ui/Layout'

export { theme } from './components/ui/theme'
export { unsupportedProperties } from './data/properties'
export { allProperties } from './data/css-properties'

export * from './lib'
export * from './types/theme'
Expand Down

0 comments on commit f3b3d68

Please sign in to comment.