Skip to content

Commit

Permalink
[FX-5658] Migrate Timeline to TailwindCSS (#4521)
Browse files Browse the repository at this point in the history
  • Loading branch information
AdrianContiu authored Sep 3, 2024
1 parent 36688bf commit e759dcb
Show file tree
Hide file tree
Showing 8 changed files with 135 additions and 194 deletions.
9 changes: 9 additions & 0 deletions .changeset/purple-donuts-attack.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
---
'@toptal/picasso-timeline': major
'@toptal/picasso': patch
---

### Timeline

- migrate to TailwindCSS, material-ui@4 is no longer required for this package
- make @toptal/picasso-tailwind-merge a peer dependency
8 changes: 4 additions & 4 deletions packages/base/Timeline/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -25,23 +25,23 @@
"@toptal/picasso-container": "3.0.0",
"@toptal/picasso-shared": "15.0.0",
"@toptal/picasso-typography": "4.0.0",
"@toptal/picasso-utils": "1.0.3",
"classnames": "^2.5.1"
"@toptal/picasso-utils": "1.0.3"
},
"sideEffects": [
"**/styles.ts",
"**/styles.js"
],
"peerDependencies": {
"@material-ui/core": "4.12.4",
"@toptal/picasso-tailwind-merge": "^2.0.0",
"@toptal/picasso-tailwind": ">=2.7",
"react": ">=16.12.0 < 19.0.0"
},
"exports": {
".": "./dist-package/src/index.js"
},
"devDependencies": {
"@toptal/picasso-test-utils": "1.1.1"
"@toptal/picasso-test-utils": "1.1.1",
"@toptal/picasso-tailwind-merge": "2.0.0"
},
"files": [
"dist-package/**",
Expand Down
12 changes: 2 additions & 10 deletions packages/base/Timeline/src/Timeline/Timeline.tsx
Original file line number Diff line number Diff line change
@@ -1,29 +1,21 @@
import React, { forwardRef } from 'react'
import type { BaseProps } from '@toptal/picasso-shared'
import cx from 'classnames'
import { makeStyles } from '@material-ui/core/styles'
import { Container } from '@toptal/picasso-container'
import { twMerge } from '@toptal/picasso-tailwind-merge'

import { TimelineRow } from '../TimelineRow'
import styles from './styles'

export type Props = BaseProps & {
/** Timeline rows */
children: React.ReactNode
}

const useStyles = makeStyles(styles, {
name: 'PicassoTimeline',
})

export const Timeline = forwardRef<HTMLDivElement, Props>(function Timeline(
{ className, children },
ref
) {
const classes = useStyles()

return (
<Container ref={ref} className={cx(classes.root, className)}>
<Container ref={ref} className={twMerge('table h-fit w-fit', className)}>
{children}
</Container>
)
Expand Down
Loading

0 comments on commit e759dcb

Please sign in to comment.