view_components icon indicating copy to clipboard operation
view_components copied to clipboard

Using border-dashed CSS class raises warning in development

Open laserlemon opened this issue 3 years ago • 1 comments

There appears to be no way to render a Primer view component with a dashed border. The system arguments don't include any argument controlling the border style.

Primer CSS supports dashed borders but when I add the CSS class to my rendered Primer view component, an exception is raised in local development.

For example:

<%= render Primer::BoxComponent.new(border: true, classes: "border-dashed") do %>
  Hello, world!
<% end %>

The message of the exception is:

Use System Arguments (https://primer.style/view-components/system-arguments) instead of Primer CSS class name border-dashed. This warning will not be raised in production. Set PRIMER_WARNINGS_DISABLED=1 to disable this warning.

I'm unable to set PRIMER_WARNINGS_DISABLED=1 as a long-term solution.

As always, thank you for your work on this amazing library of view components! 💛

laserlemon avatar Jan 26 '22 00:01 laserlemon

Hi! This issue has been marked as stale because it has been open with no activity for 180 days. You can comment on the issue or remove the stale label to keep it open. If you do nothing, this issue will be closed in 7 days.

github-actions[bot] avatar Jul 25 '22 01:07 github-actions[bot]

👋🏻 Sorry for the late reply, I think you can use border: :dashed here to get the class you want. I'm going to investigate why it's not documented.

jonrohan avatar Aug 23 '22 03:08 jonrohan