Skip to content

marceloadsj/antd-extra-props

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

11 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Antd-extra-props

A small lib to inject common props to Ant Design component library. It uses monkey patch to add some extra props helping expand the use of the ui library.

Install

yarn add antd-extra-props

or

npm install antd-extra-props

Use

// your entry file, like index.js
import { Card } from "antd";
import antdExtraProps from "antd-extra-props";

antdExtraProps({ Card });

And later:

function MyComponent() {
  return (
    <Card
      title="Card head"
      headClassName="text-purple-500"
      bodyClassName="px-10 py-20"
    >
      Card body
    </Card>
  );
}

Available Props

component prop type default value
Card headClassName string undefined
Card bodyClassName string undefined
Card actionsClassName string undefined

About

Hacky way to bypass some antd limitations like missing props...

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published