Coder Social home page Coder Social logo

Comments (12)

cdaringe avatar cdaringe commented on August 12, 2024

there are some fonts in the tripwire theme... maybe those are them?

from octagon.

cdaringe avatar cdaringe commented on August 12, 2024

hmm, i thought i saw them before. guess not? xref: https://github.com/Tripwire/octagon/pull/18/files

from octagon.

eddier avatar eddier commented on August 12, 2024

When SUI is referencing the Elegant Icons its using the original location for those fonts which is /src/styles/fonts. Chris and I had talked about including the fonts as a package dependency however we haven't done that yet.

from octagon.

jhegg avatar jhegg commented on August 12, 2024

Cool. I can't update the version of Octagon that I'm using until that happens. 😄

from octagon.

eddier avatar eddier commented on August 12, 2024

Its in progress now, I'll have it for you shortly.

from octagon.

jhegg avatar jhegg commented on August 12, 2024

Thank you!

from octagon.

jhegg avatar jhegg commented on August 12, 2024

When I use npm link, and try to use something like this in my project:

  <Icon className='ei' name='icon_error-triangle_alt' />

It doesn't find the ElegantIcon font and instead falls back to my default font, and also gives a warning of:

  Warning: Failed prop type: Invalid prop `name` of value `icon_error-triangle_alt` supplied to `Icon`.

If I reach across the linked module to import '../node_modules/react-octagon/src/styles/app.css', then the correct font is used (but I still get the invalid prop warning).

So, two questions:

  1. Should the app.css be distributed somewhere under react-octagon/lib/*? Or rather, how should an application that is using react-octagon get the non-default styling/theme? I could just be using it wrong!
  2. What can we do about the invalid prop value warning?

from octagon.

eddier avatar eddier commented on August 12, 2024

I'll start with the second issue - the prop name is validated against a predefined set of valid inputs held in an array. The recommended way around this is to use the className so in the example above it would be transformed as follows:

<Icon className='ei' name='icon_error-triangle_alt' />
to
<Icon className='ei icon_error-triangle_alt' />

There is a bit of a discussion on this here: Semantic-Org/Semantic-UI-React#931

from octagon.

eddier avatar eddier commented on August 12, 2024

For the first issue yes you probably want to update the builder.js to include a step for the /src/style dir. @cdaringe how do you want to handle this?

from octagon.

cdaringe avatar cdaringe commented on August 12, 2024

help me get caught up here. is the issue that the build process will need to manually move some font assets?

from octagon.

eddier avatar eddier commented on August 12, 2024

Yes the assets located in /src/styles are not available in the /lib dir after the build process is complete. The current build script handles components and sui, but not the style (fonts & css) objects.

from octagon.

cdaringe avatar cdaringe commented on August 12, 2024

closed by #25

from octagon.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.