Giter Club home page Giter Club logo

Comments (1)

greptile-apps avatar greptile-apps commented on July 18, 2024

Migration Steps

  1. Identify Components to Migrate

    • Review components in /packages/twenty-front/src and /packages/twenty-website/src.
    • List components that have equivalents in twenty-ui.
  2. Update Imports

    • Replace existing component imports with twenty-ui components.
    // Example: Replace Button component
    import { Button } from 'twenty-ui';
  3. Adjust Component Usage

    • Modify component usage to match twenty-ui API.
    // Example: Update Button usage
    <Button variant="primary" onClick={handleClick}>Click Me</Button>
  4. Update Styles

    • Ensure styles are consistent with twenty-ui theme.
    • Remove redundant CSS or Emotion styles.
  5. Test Components

    • Verify functionality and appearance of updated components.
    • Use Storybook stories in twenty-ui for reference.
  6. Repeat for All Components

    • Continue the process for each component identified in step 1.

Relevant Files

  • twenty-ui components: /packages/twenty-ui/src/components
  • twenty-front components: /packages/twenty-front/src
  • twenty-website components: /packages/twenty-website/src

Example Migration

  • File: /packages/twenty-front/src/components/OldButton.tsx
  • Before:
    import React from 'react';
    import './OldButton.css';
    
    const OldButton = ({ onClick, children }) => (
      <button className="old-button" onClick={onClick}>{children}</button>
    );
    
    export default OldButton;
  • After:
    import React from 'react';
    import { Button } from 'twenty-ui';
    
    const NewButton = ({ onClick, children }) => (
      <Button variant="primary" onClick={onClick}>{children}</Button>
    );
    
    export default NewButton;

References

/packages/twenty-ui
/packages/twenty-front/src
/packages/twenty-website/src

Ask Greptile

from twenty.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.