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

fix: css template function should return Record type #753

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

anran758
Copy link

@anran758 anran758 commented Dec 19, 2023

After using the astroturf css template function, we noticed that the actual output in our code is an object rather than a string.

import {css} from 'astroturf'

const styles = css`
  .button {
    padding-top: 16px;
    padding-left: 0;
  }

  .product :global(.ant-form-item-label) {
    flex-basis: auto !important;
  }
`

export default function ProductList(props) {
  console.log('styles -->', styles);
  // other code...

  return (
    <FileUpload
      key={record.id}
      accept=".csv"
      buttonProps={{
        type: 'link',
        loading: isPendingImport,
        className: styles.button,
      }}
      icon={false}
    />
  );
}

image

Therefore, it's necessary to adjust the return type of the css template function.

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.

None yet

1 participant