How to use the @project-r/styleguide.colors.error function in @project-r/styleguide

To help you get started, we’ve selected a few @project-r/styleguide examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github orbiting / republik-frontend / components / Questionnaire / Page.js View on Github external
<div>
                    <p>
                      {userHasSubmitted
                        ? t.elements('questionnaire/thankyou', {
                            metaLink: (
                              
                                <a>{t('questionnaire/thankyou/metaText')}</a>
                              
                            )
                          })
                        : t('questionnaire/ended')}
                    </p>
                  </div>
                  {showResults &amp;&amp; (
                    &lt;&gt;
                      <p style="{{">
                        Diese Resultate werden{' '}
                        nur intern{' '}
                        angezeigt.
                      </p>
                      
                    
                  )}
                
              )
            }

            // handle questions
            const questionCount = questions.filter(Boolean).length
            const userAnswerCount = questions
              .map(q =&gt; q.userAnswer)
              .filter(Boolean).length
github orbiting / republik-frontend / components / Profile / Edit.js View on Github external
<div>
        
        <br>
        {t('profile/edit/updating')}
      </div>
    )
  }

  const errorMessages = Object.keys(state.errors)
    .map(key =&gt; state.errors[key])
    .filter(Boolean)

  return (
    <div>
      {!!state.showErrors &amp;&amp; errorMessages.length &gt; 0 &amp;&amp; (
        <div style="{{">
          {t('profile/edit/errors')}
          <br>
          <ul>
            {errorMessages.map((error, i) =&gt; (
              <li>{error}</li>
            ))}
          </ul>
        </div>
      )}
      {!!state.error &amp;&amp; (
        <div style="{{">
          {state.error}
        </div>
      )}
      </div>
github orbiting / publikator-frontend / components / Publication / PublishForm.js View on Github external
{FRONTEND_BASE_URL.replace(/https?:\/\/(www\.)?/, '')}
                  {schema.getPath
                    ? schema.getPath({
                        ...meta,
                        publishDate: designatedPublishDate
                      })
                    : `/${meta.slug}`}
                

                <br>
                <br>

                {hasErrors &amp;&amp; (
                  <span>
                    
                      {t('publish/validation/hasErrors')}
                    
                    <ul style="{{">
                      {errors.map((error, i) =&gt; (
                        <li>
                          
                            {error}
                          
                        </li>
                      ))}
                    </ul>
                    <br>
                    <br>
                  </span>
                )}
                {warnings.length &gt; 0 &amp;&amp; (
github orbiting / republik-frontend / components / Profile / Update.js View on Github external
/&gt;

                <br>
                <br>
                <br>
                {updating ? (
                  <div style="{{">
                    
                    <br>
                    {t('Account/Update/updating')}
                  </div>
                ) : (
                  <div>
                    {!!this.state.showErrors &amp;&amp;
                    errorMessages.length &gt; 0 &amp;&amp; (
                      <div style="{{">
                        {t('Account/submit/error/title')}
                        <br>
                        <ul>
                          {errorMessages.map((error, i) =&gt; (
                            <li>{error}</li>
                          ))}
                        </ul>
                      </div>
                    )}
                    {!!this.state.error &amp;&amp; (
                      <div style="{{">
                        {this.state.error}
                      </div>
                    )}
                    <div style="{{">
                      </div></div>
github orbiting / republik-frontend / components / Questionnaire / Questionnaire.js View on Github external
zIndex: 10,
    position: 'sticky',
    padding: '10px 0',
    borderBottom: `0.5px solid ${colors.divider}`,
    display: 'flex',
    minHeight: 55,
    top: HEADER_HEIGHT - 1,
    [mediaQueries.onlyS]: {
      top: HEADER_HEIGHT_MOBILE - 1
    }
  }),
  strong: css({
    fontFamily: fontFamilies.sansSerifMedium
  }),
  error: css({
    color: colors.error,
    fontFamily: fontFamilies.sansSerifMedium
  }),
  closed: css({
    marginTop: 35,
    background: colors.primaryBg,
    width: '100%',
    alignItems: 'center',
    justifyContent: 'center',
    padding: 30,
    textAlign: 'center',
    marginBottom: 30
  }),
  progressIcon: css({
    marginLeft: 5,
    marginTop: 3,
    minHeight: 30
github orbiting / republik-frontend / components / Vote / AddressEditor.js View on Github external
{
                  this.setState(FieldSet.utils.mergeFields(fields))
                }}
              /&gt;
            
            {error &amp;&amp; (
              <div>
                
              </div>
            )}
            {!isValid &amp;&amp; (
              <div style="{{">
                {vt('info/candidacy/missingFields')}
                <ul>
                  {Object.keys(errors).map(
                    k =&gt; !!errors[k] &amp;&amp; <li>{errors[k]}</li>
                  )}
                </ul>
              </div>
            )}
            <div>
              <button disabled="{!isValid}">
                {updating ? (
                  
                ) : (
                  t('Account/Update/submit')
                )}
              </button></div>
github orbiting / crowdfunding-frontend / components / Me / ClaimMembership.js View on Github external
value={values.email}
          onChange={(_, value, shouldValidate) =&gt; {
            this.handleEmail(value, shouldValidate, t)
          }} /&gt;
        <br>
         {
            this.handleVoucherCode(value, shouldValidate, t)
          }} /&gt;
        <br>
        <br>
        {!!this.state.showErrors &amp;&amp; errorMessages.length &gt; 0 &amp;&amp; (
          <div style="{{color:">
            {t('memberships/claim/error/title')}<br>
            <ul>
              {errorMessages.map((error, i) =&gt; (
                <li>{error}</li>
              ))}
            </ul>
          </div>
        )}
         {
            this.setState(() =&gt; ({legal: checked}))
          }}&gt;
github orbiting / crowdfunding-frontend / components / Me / Update.js View on Github external
onChange={(fields) =&gt; {
                  this.setState(FieldSet.utils.mergeFields(fields))
                }} /&gt;
              <br>
              <br>
              <br>
              {updating ? (
                <div style="{{textAlign:">
                  
                  <br>
                  {t('merci/updateMe/updating')}
                </div>
              ) : (
                <div>
                  {!!this.state.showErrors &amp;&amp; errorMessages.length &gt; 0 &amp;&amp; (
                    <div style="{{color:">
                      {t('pledge/submit/error/title')}<br>
                      <ul>
                        {errorMessages.map((error, i) =&gt; (
                          <li>{error}</li>
                        ))}
                      </ul>
                    </div>
                  )}
                  {!!this.state.error &amp;&amp; (
                    <div style="{{color:">
                      {this.state.error}
                    </div>
                  )}
                  <div style="{{opacity:">
                    <button> {
                      if (errorMessages.length) {</button></div></div>
github orbiting / crowdfunding-frontend / components / Pledge / Form.js View on Github external
const showSignIn = this.state.showSignIn &amp;&amp; !me

        const pkg = query.package
          ? crowdfunding.packages.find(
              pkg =&gt; pkg.name === query.package.toUpperCase()
            )
          : null
        const userPrice = !!query.userPrice

        return (
          <div>
            <h1>{t('pledge/title')}</h1>

            {!!receiveError &amp;&amp; (
              <p style="{{color:">
                
              </p>
            )}

            <div style="{{marginBottom:">
              {pkg ? (
                 {</div></div>