You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The API end point provided by django-pattern-library only generates the HTML of the pattern. However, what if I need CSS, JS or images to properly render the component? Let's say I have the following component:
<buttontype="button"class="{{ class }}">{{ text}}</button>
In my story I specify the class danger, which is supposed to color the button red according to the global CSS. However, since the CSS is missing it will be displayed like any other button. In django-pattern-library I have the page template as a wrapper which can include the global CSS file. What is the correct way of going about this? And what about component libraries like django-components, django-cotton or JinjaX?
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
Uh oh!
There was an error while loading. Please reload this page.
-
The API end point provided by django-pattern-library only generates the HTML of the pattern. However, what if I need CSS, JS or images to properly render the component? Let's say I have the following component:
In my story I specify the class
danger
, which is supposed to color the button red according to the global CSS. However, since the CSS is missing it will be displayed like any other button. In django-pattern-library I have the page template as a wrapper which can include the global CSS file. What is the correct way of going about this? And what about component libraries like django-components, django-cotton or JinjaX?Beta Was this translation helpful? Give feedback.
All reactions