import React from 'react';

import DetailsLayout from '../../layouts/DetailsLayout';
import BrowserFrame from '../../placeholders/BrowserFrame';
import Circle from '../../placeholders/Circle';

const Details: React.FC<{}> = () => {
    return (
        <DetailsLayout title="Search box">
            <div style={{ padding: '64px 32px' }}>
                <BrowserFrame
                    content={(
                        <div
                            style={{
                                alignItems: 'center',
                                display: 'flex',
                                flexDirection: 'column',
                                height: '100%',
                                justifyContent: 'center',
                                padding: '8px',
                            }}
                        >
                            <div style={{ width: '256px' }}>
                                <div
                                    style={{
                                        border: '1px solid rgba(0, 0, 0, 0.3)',
                                        borderRadius: '2px',
                                        display: 'flex',
                                        marginBottom: '16px',
                                    }}
                                >
                                    <input
                                        type="text"
                                        placeholder="Search"
                                        style={{
                                            borderColor: 'transparent',
                                            flex: 1,
                                            padding: '4px',
                                        }}
                                    />
                                    <div style={{ padding: '8px' }}>
                                        <Circle />
                                    </div>
                                </div>

                                <div
                                    style={{
                                        border: '1px solid rgba(0, 0, 0, 0.3)',
                                        borderRadius: '2px',
                                        display: 'flex',
                                        flexDirection: 'row-reverse',
                                    }}
                                >
                                    <input
                                        type="text"
                                        placeholder="Search"
                                        style={{
                                            borderColor: 'transparent',
                                            flex: 1,
                                            padding: '4px',
                                        }}
                                    />
                                    <div style={{ padding: '8px' }}>
                                        <Circle />
                                    </div>
                                </div>
                            </div>
                        </div>
                    )}
                    source={`
<div style="
    display: flex;

    /* If you want to place the icon before the text input */
    flex-direction: row-reverse;

    /* Border */
    border: 1px solid rgba(0, 0, 0, 0.3);
">
    <!-- Text input -->
    <input
        type="text"
        style="
            border-color: transparent;
            /* Take available width */
            flex: 1;
        "
    />

    <!-- Search icon sticks to the left or right -->
    ...
</div>
`}
                />
            </div>
        </DetailsLayout>
    );
};

export default Details;
