<commit_before>import * as React from 'react';
import { storiesOf } from '@storybook/react';
import Bar from '../src/app/components/common/bar/bar';

storiesOf('Bar', module)
    .add('Full red', () => 
        getComponent()
    )
    .add('Half-filled green', () => 
        getComponent({actual: 70, color: 'green'})
    )
    .add('Empty', () => 
        getComponent({actual: 0})
    )
    .add('All colors', () => 
        getAllVariants()
    )
    .add('Values varies every 1 second', () => 
        getAnimatingComponent()
    );

function getComponent(props?: any) {
    let defaultProps = {
        title: 'HP',
        actual: 100,
        max: 100,
        color: 'red'
    };
    return <div style={{width: 300}}>
            <Bar {...Object.assign({}, defaultProps, props)} />
        </div>;
}

function getAllVariants() {
    return <div>
        {getComponent({color: 'red'})}
        {getComponent({color: 'green'})}<commit_msg>feat: tweaked some styles<commit_after>import * as React from 'react';
import { storiesOf } from '@storybook/react';
import Bar from '../src/app/components/common/bar/bar';

storiesOf('Bar', module)
    .add('Full red', () => 
        getComponent()
    )
    .add('Half-filled green', () => 
        getComponent({actual: 70, color: 'green'})
    )
    .add('Empty', () => 
        getComponent({actual: 0})
    )
    .add('All colors', () => 
        getAllVariants()
    )
    .add('Values varies every 1 second', () => 
        getAnimatingComponent()
    );

function getComponent(props?: any) {
    let defaultProps = {
        title: 'HP',
        actual: 100,
        max: 100,
        color: 'red'
    };
    return <div style={{width: 300, marginLeft: 20, marginTop: 20}}>
            <Bar {...Object.assign({}, defaultProps, props)} />
        </div>;
}

function getAllVariants() {
    return <div>
        {getComponent({color: 'red'})}
        {getComponent({color: 'green'})}
{'fraction_non_alphanumeric': 0.18120805369127516, 'fraction_numerical': 0.015487867836861126, 'mean_word_length': 2.3763066202090593, 'pattern_counts': {'":': 0, '<': 11, '<?xml version=': 0, '>': 21, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '7423365', 'n_tokens_mistral': 638, 'n_tokens_neox': 597, 'n_words': 138}