Skip to content
Discussion options

You must be logged in to vote

Please see https://panda-css.com/docs/concepts/merging-styles#merging-within-jsx-component

The ideal solution here is to use the css prop for merging not classname
https://play.panda-css.com/n_xuAAdF03/GhlNzYlHb-

import { css, cva } from 'styled-system/css';
import { styled } from 'styled-system/jsx';
import { center } from 'styled-system/patterns';

export const App = () => {
  return (
    <div className={center({ h: 'full' })}>
      <Root css={{ color: 'green' }}>Hi</Root>
    </div>
  );
};

const Root = styled('div', {
  base: {
    color: 'blue',
  },
});

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@existentialism
Comment options

Answer selected by segunadebayo
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants